react-native-css 2.1.1 → 3.0.0-nightly.19372e8
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.md → LICENSE} +6 -8
- package/README.md +177 -70
- 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 +9 -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 +114 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -0
- package/dist/commonjs/compiler/compiler.js +281 -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 +2166 -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/keyframes.js +60 -0
- package/dist/commonjs/compiler/keyframes.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 +501 -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 +476 -0
- package/dist/commonjs/compiler/stylesheet.js.map +1 -0
- package/dist/commonjs/compiler/supports.js +27 -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 +19 -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/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 +17 -0
- package/dist/commonjs/components/TextInput.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/index.js +84 -0
- package/dist/commonjs/components/index.js.map +1 -0
- package/dist/commonjs/doctor/index.js +6 -0
- package/dist/commonjs/doctor/index.js.map +1 -0
- package/dist/commonjs/index.js +28 -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 +56 -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 +167 -0
- package/dist/commonjs/metro/index.js.map +1 -0
- package/dist/commonjs/metro/injection-code.js +32 -0
- package/dist/commonjs/metro/injection-code.js.map +1 -0
- package/dist/commonjs/metro/metro-transformer.js +21 -0
- package/dist/commonjs/metro/metro-transformer.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 +62 -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/package.json +1 -0
- package/dist/commonjs/poison.pill.js +39 -0
- package/dist/commonjs/poison.pill.js.map +1 -0
- package/dist/commonjs/runtime/index.js +17 -0
- package/dist/commonjs/runtime/index.js.map +1 -0
- package/dist/commonjs/runtime/native/api.js +90 -0
- package/dist/commonjs/runtime/native/api.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
- package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js +123 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/guards.js +33 -0
- package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/index.js +40 -0
- package/dist/commonjs/runtime/native/conditions/index.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js +98 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/commonjs/runtime/native/index.js +28 -0
- package/dist/commonjs/runtime/native/index.js.map +1 -0
- package/dist/commonjs/runtime/native/injection.js +100 -0
- package/dist/commonjs/runtime/native/injection.js.map +1 -0
- package/dist/commonjs/runtime/native/metro.js +6 -0
- package/dist/commonjs/runtime/native/metro.js.map +1 -0
- package/dist/commonjs/runtime/native/react/interaction.js +63 -0
- package/dist/commonjs/runtime/native/react/interaction.js.map +1 -0
- package/dist/commonjs/runtime/native/react/rules.js +255 -0
- package/dist/commonjs/runtime/native/react/rules.js.map +1 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js +159 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js +50 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/commonjs/runtime/native/reactivity.js +178 -0
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -0
- package/dist/commonjs/runtime/native/reanimated.js +17 -0
- package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
- package/dist/commonjs/runtime/native/root.js +28 -0
- package/dist/commonjs/runtime/native/root.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js +148 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/constants.js +9 -0
- package/dist/commonjs/runtime/native/styles/constants.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/defaults.js +69 -0
- package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
- package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/calc.js +125 -0
- package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/filters.js +84 -0
- package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/index.js +61 -0
- package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/platform-functions.js +46 -0
- package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +121 -0
- package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/index.js +115 -0
- package/dist/commonjs/runtime/native/styles/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +106 -0
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/_handler.js +79 -0
- package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/animation.js +57 -0
- package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/border.js +12 -0
- package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +40 -0
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
- package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js +13 -0
- package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/transform.js +23 -0
- package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/units.js +52 -0
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/variables.js +79 -0
- package/dist/commonjs/runtime/native/styles/variables.js.map +1 -0
- package/dist/commonjs/runtime/runtime.js +17 -0
- package/dist/commonjs/runtime/runtime.js.map +1 -0
- package/dist/commonjs/runtime/runtime.native.js +17 -0
- package/dist/commonjs/runtime/runtime.native.js.map +1 -0
- package/dist/commonjs/runtime/runtime.types.js +6 -0
- package/dist/commonjs/runtime/runtime.types.js.map +1 -0
- package/dist/commonjs/runtime/utils/components.js +18 -0
- package/dist/commonjs/runtime/utils/components.js.map +1 -0
- package/dist/commonjs/runtime/utils/dot-notation.types.js +2 -0
- package/dist/commonjs/runtime/utils/dot-notation.types.js.map +1 -0
- package/dist/commonjs/runtime/utils/index.js +61 -0
- package/dist/commonjs/runtime/utils/index.js.map +1 -0
- package/dist/commonjs/runtime/utils/objects.js +92 -0
- package/dist/commonjs/runtime/utils/objects.js.map +1 -0
- package/dist/commonjs/runtime/utils/specificity.js +44 -0
- package/dist/commonjs/runtime/utils/specificity.js.map +1 -0
- package/dist/commonjs/runtime/utils/style-value.js +21 -0
- package/dist/commonjs/runtime/utils/style-value.js.map +1 -0
- package/dist/commonjs/runtime/utils/utils.types.js +6 -0
- package/dist/commonjs/runtime/utils/utils.types.js.map +1 -0
- package/dist/commonjs/runtime/web/api.js +68 -0
- package/dist/commonjs/runtime/web/api.js.map +1 -0
- package/dist/commonjs/runtime/web/assign-style.js +27 -0
- package/dist/commonjs/runtime/web/assign-style.js.map +1 -0
- package/dist/commonjs/runtime/web/index.js +18 -0
- package/dist/commonjs/runtime/web/index.js.map +1 -0
- package/dist/commonjs/runtime/web/metro.js +6 -0
- package/dist/commonjs/runtime/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 +110 -0
- package/dist/module/compiler/atRules.js.map +1 -0
- package/dist/module/compiler/compiler.js +276 -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 +2091 -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/keyframes.js +54 -0
- package/dist/module/compiler/keyframes.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 +496 -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 +471 -0
- package/dist/module/compiler/stylesheet.js.map +1 -0
- package/dist/module/compiler/supports.js +23 -0
- package/dist/module/compiler/supports.js.map +1 -0
- package/dist/module/components/ActivityIndicator.js +17 -0
- package/dist/module/components/ActivityIndicator.js.map +1 -0
- package/dist/module/components/Button.js +17 -0
- package/dist/module/components/Button.js.map +1 -0
- package/dist/module/components/FlatList.js +14 -0
- package/dist/module/components/FlatList.js.map +1 -0
- package/dist/module/components/Image.js +12 -0
- package/dist/module/components/Image.js.map +1 -0
- package/dist/module/components/Switch.js +12 -0
- package/dist/module/components/Switch.js.map +1 -0
- package/dist/module/components/Text.js +12 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/TextInput.js +12 -0
- package/dist/module/components/TextInput.js.map +1 -0
- package/dist/module/components/View.js +12 -0
- package/dist/module/components/View.js.map +1 -0
- package/dist/module/components/index.js +12 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/doctor/index.js +4 -0
- package/dist/module/doctor/index.js.map +1 -0
- package/dist/module/index.js +5 -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 +50 -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 +161 -0
- package/dist/module/metro/index.js.map +1 -0
- package/dist/module/metro/injection-code.js +27 -0
- package/dist/module/metro/injection-code.js.map +1 -0
- package/dist/module/metro/metro-transformer.js +17 -0
- package/dist/module/metro/metro-transformer.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 +57 -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/package.json +1 -0
- package/dist/module/poison.pill.js +37 -0
- package/dist/module/poison.pill.js.map +1 -0
- package/dist/module/runtime/index.js +9 -0
- package/dist/module/runtime/index.js.map +1 -0
- package/dist/module/runtime/native/api.js +75 -0
- package/dist/module/runtime/native/api.js.map +1 -0
- package/dist/module/runtime/native/conditions/attributes.js +38 -0
- package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
- package/dist/module/runtime/native/conditions/container-query.js +117 -0
- package/dist/module/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/module/runtime/native/conditions/guards.js +29 -0
- package/dist/module/runtime/native/conditions/guards.js.map +1 -0
- package/dist/module/runtime/native/conditions/index.js +36 -0
- package/dist/module/runtime/native/conditions/index.js.map +1 -0
- package/dist/module/runtime/native/conditions/media-query.js +93 -0
- package/dist/module/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/module/runtime/native/index.js +5 -0
- package/dist/module/runtime/native/index.js.map +1 -0
- package/dist/module/runtime/native/injection.js +95 -0
- package/dist/module/runtime/native/injection.js.map +1 -0
- package/dist/module/runtime/native/metro.js +5 -0
- package/dist/module/runtime/native/metro.js.map +1 -0
- package/dist/module/runtime/native/react/interaction.js +59 -0
- package/dist/module/runtime/native/react/interaction.js.map +1 -0
- package/dist/module/runtime/native/react/rules.js +248 -0
- package/dist/module/runtime/native/react/rules.js.map +1 -0
- package/dist/module/runtime/native/react/useNativeCss.js +153 -0
- package/dist/module/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/module/runtime/native/react/usePassthrough.js +45 -0
- package/dist/module/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/module/runtime/native/reactivity.js +166 -0
- package/dist/module/runtime/native/reactivity.js.map +1 -0
- package/dist/module/runtime/native/reanimated.js +13 -0
- package/dist/module/runtime/native/reanimated.js.map +1 -0
- package/dist/module/runtime/native/root.js +24 -0
- package/dist/module/runtime/native/root.js.map +1 -0
- package/dist/module/runtime/native/styles/calculate-props.js +143 -0
- package/dist/module/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/module/runtime/native/styles/constants.js +5 -0
- package/dist/module/runtime/native/styles/constants.js.map +1 -0
- package/dist/module/runtime/native/styles/defaults.js +65 -0
- package/dist/module/runtime/native/styles/defaults.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
- package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/calc.js +120 -0
- package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/filters.js +70 -0
- package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/index.js +8 -0
- package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/platform-functions.js +36 -0
- package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/transform-functions.js +114 -0
- package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/index.js +110 -0
- package/dist/module/runtime/native/styles/index.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +101 -0
- package/dist/module/runtime/native/styles/resolve.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthands/_handler.js +74 -0
- package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthands/animation.js +51 -0
- package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthands/border.js +8 -0
- package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js +35 -0
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
- package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthands/text-shadow.js +9 -0
- package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthands/transform.js +18 -0
- package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
- package/dist/module/runtime/native/styles/units.js +43 -0
- package/dist/module/runtime/native/styles/units.js.map +1 -0
- package/dist/module/runtime/native/styles/variables.js +75 -0
- package/dist/module/runtime/native/styles/variables.js.map +1 -0
- package/dist/module/runtime/runtime.js +4 -0
- package/dist/module/runtime/runtime.js.map +1 -0
- package/dist/module/runtime/runtime.native.js +4 -0
- package/dist/module/runtime/runtime.native.js.map +1 -0
- package/dist/module/runtime/runtime.types.js +4 -0
- package/dist/module/runtime/runtime.types.js.map +1 -0
- package/dist/module/runtime/utils/components.js +14 -0
- package/dist/module/runtime/utils/components.js.map +1 -0
- package/dist/module/runtime/utils/dot-notation.types.js +2 -0
- package/dist/module/runtime/utils/dot-notation.types.js.map +1 -0
- package/dist/module/runtime/utils/index.js +8 -0
- package/dist/module/runtime/utils/index.js.map +1 -0
- package/dist/module/runtime/utils/objects.js +84 -0
- package/dist/module/runtime/utils/objects.js.map +1 -0
- package/dist/module/runtime/utils/specificity.js +39 -0
- package/dist/module/runtime/utils/specificity.js.map +1 -0
- package/dist/module/runtime/utils/style-value.js +16 -0
- package/dist/module/runtime/utils/style-value.js.map +1 -0
- package/dist/module/runtime/utils/utils.types.js +4 -0
- package/dist/module/runtime/utils/utils.types.js.map +1 -0
- package/dist/module/runtime/web/api.js +59 -0
- package/dist/module/runtime/web/api.js.map +1 -0
- package/dist/module/runtime/web/assign-style.js +23 -0
- package/dist/module/runtime/web/assign-style.js.map +1 -0
- package/dist/module/runtime/web/index.js +6 -0
- package/dist/module/runtime/web/index.js.map +1 -0
- package/dist/module/runtime/web/metro.js +5 -0
- package/dist/module/runtime/web/metro.js.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/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 +1 -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 +197 -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 +118 -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/keyframes.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.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 +68 -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 +13 -0
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Button.d.ts +13 -0
- package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/FlatList.d.ts +10 -0
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Image.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Switch.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TextInput.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/View.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +10 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/doctor/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/doctor/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/index.d.ts +3 -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 +16 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.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/poison.pill.d.ts +2 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +38 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +55 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/root.d.ts +11 -0
- package/dist/typescript/commonjs/src/runtime/native/root.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts +12 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts +8 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts +11 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/runtime.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts +47 -0
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts +23 -0
- package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +13 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts.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/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 +1 -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 +197 -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 +118 -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/keyframes.d.ts +7 -0
- package/dist/typescript/module/src/compiler/keyframes.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 +68 -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 +13 -0
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Button.d.ts +13 -0
- package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
- package/dist/typescript/module/src/components/FlatList.d.ts +10 -0
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Image.d.ts +8 -0
- package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Switch.d.ts +8 -0
- package/dist/typescript/module/src/components/Switch.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Text.d.ts +8 -0
- package/dist/typescript/module/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TextInput.d.ts +8 -0
- package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
- package/dist/typescript/module/src/components/View.d.ts +8 -0
- package/dist/typescript/module/src/components/View.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +10 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -0
- package/dist/typescript/module/src/doctor/index.d.ts +2 -0
- package/dist/typescript/module/src/doctor/index.d.ts.map +1 -0
- package/dist/typescript/module/src/index.d.ts +3 -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 +16 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/module/src/metro/metro-transformer.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/poison.pill.d.ts +2 -0
- package/dist/typescript/module/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/index.d.ts +7 -0
- package/dist/typescript/module/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +38 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +55 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/root.d.ts +11 -0
- package/dist/typescript/module/src/runtime/native/root.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts +12 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts +8 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts +11 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.d.ts +2 -0
- package/dist/typescript/module/src/runtime/runtime.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.native.d.ts +2 -0
- package/dist/typescript/module/src/runtime/runtime.native.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.types.d.ts +47 -0
- package/dist/typescript/module/src/runtime/runtime.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/components.d.ts +2 -0
- package/dist/typescript/module/src/runtime/utils/components.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts +23 -0
- package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/utils/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/objects.d.ts +5 -0
- package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts +13 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts.map +1 -0
- package/package.json +248 -45
- 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 +158 -0
- package/src/compiler/compiler.ts +305 -0
- package/src/compiler/compiler.types.ts +267 -0
- package/src/compiler/container-query.ts +97 -0
- package/src/compiler/declarations.ts +3177 -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/keyframes.ts +86 -0
- package/src/compiler/media-query.ts +251 -0
- package/src/compiler/pseudo-elements.ts +54 -0
- package/src/compiler/selector-builder.ts +586 -0
- package/src/compiler/selectors.ts +505 -0
- package/src/compiler/split-by-delimiter.ts +19 -0
- package/src/compiler/stylesheet.ts +681 -0
- package/src/compiler/supports.ts +26 -0
- package/src/components/ActivityIndicator.tsx +27 -0
- package/src/components/Button.tsx +22 -0
- package/src/components/FlatList.tsx +21 -0
- package/src/components/Image.tsx +17 -0
- package/src/components/Switch.tsx +17 -0
- package/src/components/Text.tsx +17 -0
- package/src/components/TextInput.tsx +17 -0
- package/src/components/View.tsx +17 -0
- package/src/components/index.tsx +10 -0
- package/src/doctor/index.ts +1 -0
- package/src/index.ts +3 -0
- package/src/jest/expect.d.ts +1 -0
- package/src/jest/index.ts +74 -0
- package/src/jest/setup.ts +1 -0
- package/src/jest/setupAfterEnv.ts +13 -0
- package/src/metro/index.ts +237 -0
- package/src/metro/injection-code.ts +38 -0
- package/src/metro/metro-transformer.ts +31 -0
- package/src/metro/picocolors.ts +77 -0
- package/src/metro/resolver.ts +89 -0
- package/src/metro/stringify.ts +59 -0
- package/src/metro/typescript.ts +73 -0
- package/src/poison.pill.ts +36 -0
- package/src/runtime/index.ts +7 -0
- package/src/runtime/native/api.ts +106 -0
- package/src/runtime/native/conditions/attributes.ts +52 -0
- package/src/runtime/native/conditions/container-query.ts +162 -0
- package/src/runtime/native/conditions/guards.ts +44 -0
- package/src/runtime/native/conditions/index.ts +54 -0
- package/src/runtime/native/conditions/media-query.ts +98 -0
- package/src/runtime/native/index.ts +4 -0
- package/src/runtime/native/injection.ts +132 -0
- package/src/runtime/native/metro.ts +2 -0
- package/src/runtime/native/react/interaction.ts +90 -0
- package/src/runtime/native/react/rules.ts +330 -0
- package/src/runtime/native/react/useNativeCss.ts +203 -0
- package/src/runtime/native/react/usePassthrough.ts +51 -0
- package/src/runtime/native/reactivity.ts +243 -0
- package/src/runtime/native/reanimated.ts +22 -0
- package/src/runtime/native/root.ts +31 -0
- package/src/runtime/native/styles/calculate-props.ts +197 -0
- package/src/runtime/native/styles/constants.ts +2 -0
- package/src/runtime/native/styles/defaults.ts +79 -0
- package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
- package/src/runtime/native/styles/functions/calc.ts +121 -0
- package/src/runtime/native/styles/functions/filters.ts +98 -0
- package/src/runtime/native/styles/functions/index.ts +5 -0
- package/src/runtime/native/styles/functions/platform-functions.ts +50 -0
- package/src/runtime/native/styles/functions/transform-functions.ts +84 -0
- package/src/runtime/native/styles/index.ts +197 -0
- package/src/runtime/native/styles/resolve.ts +162 -0
- package/src/runtime/native/styles/shorthands/_handler.ts +121 -0
- package/src/runtime/native/styles/shorthands/animation.ts +122 -0
- package/src/runtime/native/styles/shorthands/border.ts +10 -0
- package/src/runtime/native/styles/shorthands/box-shadow.ts +54 -0
- package/src/runtime/native/styles/shorthands/index.ts +5 -0
- package/src/runtime/native/styles/shorthands/text-shadow.ts +17 -0
- package/src/runtime/native/styles/shorthands/transform.ts +23 -0
- package/src/runtime/native/styles/units.ts +57 -0
- package/src/runtime/native/styles/variables.ts +84 -0
- package/src/runtime/runtime.native.ts +1 -0
- package/src/runtime/runtime.ts +1 -0
- package/src/runtime/runtime.types.ts +130 -0
- package/src/runtime/utils/components.ts +15 -0
- package/src/runtime/utils/dot-notation.types.ts +118 -0
- package/src/runtime/utils/index.ts +5 -0
- package/src/runtime/utils/objects.ts +109 -0
- package/src/runtime/utils/specificity.ts +45 -0
- package/src/runtime/utils/style-value.ts +24 -0
- package/src/runtime/utils/utils.types.ts +19 -0
- package/src/runtime/web/api.ts +88 -0
- package/src/runtime/web/assign-style.ts +26 -0
- package/src/runtime/web/index.ts +5 -0
- package/src/runtime/web/metro.ts +2 -0
- package/types.d.ts +70 -0
- package/.babelrc +0 -8
- package/.editorconfig +0 -17
- package/.eslintignore +0 -3
- package/.eslintrc +0 -39
- package/.npmignore +0 -7
- package/build/index.js +0 -294
- package/build/utils.js +0 -54
- package/circle.yml +0 -31
- package/jsconfig.json +0 -9
- package/login.sh +0 -11
- package/src/index.js +0 -184
- package/src/utils.js +0 -32
- package/test/rnc.test.js +0 -258
- package/yarn.lock +0 -3333
package/{LICENSE.md → LICENSE}
RENAMED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
===============
|
|
3
|
-
|
|
4
|
-
Copyright (c) 2016 Sabeur Thabti
|
|
1
|
+
MIT License
|
|
5
2
|
|
|
3
|
+
Copyright (c) 2025 Mark Lawlor
|
|
6
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
5
|
of this software and associated documentation files (the "Software"), to deal
|
|
8
6
|
in the Software without restriction, including without limitation the rights
|
|
@@ -10,13 +8,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
10
8
|
copies of the Software, and to permit persons to whom the Software is
|
|
11
9
|
furnished to do so, subject to the following conditions:
|
|
12
10
|
|
|
13
|
-
The above copyright notice and this permission notice shall be included in
|
|
14
|
-
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
15
13
|
|
|
16
14
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
15
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
16
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
17
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
18
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
-
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,95 +1,202 @@
|
|
|
1
|
+
# react-native-css
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
The awesome @danilosterrapid7 create a babel-plugin for React-native-css:
|
|
3
|
+
A CSS polyfill for React Native
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The goal of this library is to provide the most complete CSS support for React Native, within the limitations of Yoga and the core React Native package. This includes multiple advanced CSS features like media queries, container queries, CSS variables, and more.
|
|
6
6
|
|
|
7
|
+
## Installation
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
1. Create a CSS file in your project, e.g. `styles.css`.
|
|
10
|
+
2. Import the CSS file in your App entry point, or root layout component:
|
|
11
|
+
3. Setup the bundler using one of the methods below.
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
### Metro based projects
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
> [!TIP]
|
|
16
|
+
> All Expo and React Native Community CLI projects use Metro as the bundler, so this guide applies to them.
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
- No CLI, we believe that this is an unnecessary context switch
|
|
17
|
-
- NO I/O, no longer writing files, we do everything at runtime.
|
|
18
|
+
You will need to add `withReactNativeCSS` to your Metro configuration.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
```ts
|
|
21
|
+
import { getDefaultConfig } from "expo/metro-config";
|
|
22
|
+
import { withReactNativeCSS } from "react-native-css/metro";
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
const defaultConfig = getDefaultConfig(__dirname);
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
export default withReactNativeCSS(defaultConfig);
|
|
27
|
+
|
|
28
|
+
// OR with the globalClassNamePolyfill enabled
|
|
29
|
+
export default withReactNativeCSS(defaultConfig, {
|
|
30
|
+
globalClassNamePolyfill: true,
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Other bundlers
|
|
35
|
+
|
|
36
|
+
`react-native-css` officially only supports Metro as the bundler, but we welcome community contributions to support other bundlers like Webpack, Vite or Turbopack.
|
|
37
|
+
|
|
38
|
+
More documentation coming soon.
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
You can use the library by importing the React Native components directly from `react-native-css/components`:
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { View } from 'react-native-css/components';
|
|
46
|
+
|
|
47
|
+
import "./styles.css";
|
|
48
|
+
|
|
49
|
+
export default function App() {
|
|
50
|
+
return (
|
|
51
|
+
<View className="container">
|
|
52
|
+
<View className="box" />
|
|
53
|
+
</View>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### With `globalClassNamePolyfill`
|
|
59
|
+
|
|
60
|
+
Enabling the `globalClassNamePolyfill` allows you to use the classNames prop on any React Native component, similar to how you would use it in a web application.
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { View } from 'react-native';
|
|
64
|
+
|
|
65
|
+
import "./styles.css";
|
|
66
|
+
|
|
67
|
+
export default function App() {
|
|
68
|
+
return (
|
|
69
|
+
<View className="container">
|
|
70
|
+
<View className="box" />
|
|
71
|
+
</View>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
25
74
|
```
|
|
26
75
|
|
|
27
|
-
|
|
28
|
-
|
|
76
|
+
To enable the `globalClassNamePolyfill`, you need to enable it in your Metro configuration:
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
import { withReactNativeCSS } from "react-native-css/metro";
|
|
80
|
+
|
|
81
|
+
module.exports = withReactNativeCSS(
|
|
82
|
+
{
|
|
83
|
+
// Your existing Metro configuration
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
globalClassNamePolyfill: true,
|
|
87
|
+
},
|
|
88
|
+
);
|
|
29
89
|
```
|
|
30
90
|
|
|
91
|
+
### Via hooks
|
|
92
|
+
|
|
93
|
+
#### `useCssElement`
|
|
94
|
+
|
|
95
|
+
You can also use the `useCssElement` hook.
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import { View as RNView } from 'react-native';
|
|
99
|
+
import { useCssElement } from 'react-native-css';
|
|
100
|
+
|
|
101
|
+
export default function App() {
|
|
102
|
+
const Container = useCssElement(RNView, {
|
|
103
|
+
className: "container",
|
|
104
|
+
});
|
|
31
105
|
|
|
32
|
-
|
|
106
|
+
const Box = useCssElement(RNView, {
|
|
107
|
+
className: "container",
|
|
108
|
+
});
|
|
33
109
|
|
|
34
|
-
|
|
110
|
+
return (
|
|
111
|
+
<Container>
|
|
112
|
+
<Box />
|
|
113
|
+
</Container>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
> [!IMPORTANT]
|
|
119
|
+
> The hook returns a React Element, not a style object. The element will work on all platforms and will correctly apply the React context needed to support all features of the library
|
|
35
120
|
|
|
36
|
-
|
|
37
|
-
import RNC from 'react-native-css';
|
|
121
|
+
#### `useNativeCssStyle`
|
|
38
122
|
|
|
39
|
-
|
|
40
|
-
description {
|
|
41
|
-
margin-bottom: 20px;
|
|
42
|
-
font-size: 18px;
|
|
43
|
-
text-align: center;
|
|
44
|
-
color: #656656;
|
|
45
|
-
}
|
|
123
|
+
If you just require the style object, you can use the `useNativeCssStyle` hook:
|
|
46
124
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
align-items: center;
|
|
51
|
-
display: block;
|
|
52
|
-
}
|
|
53
|
-
`
|
|
125
|
+
```ts
|
|
126
|
+
import { View as RNView } from 'react-native';
|
|
127
|
+
import { useNativeCssStyle } from 'react-native-css';
|
|
54
128
|
|
|
129
|
+
import "./styles.css";
|
|
130
|
+
|
|
131
|
+
export default function App() {
|
|
132
|
+
return (
|
|
133
|
+
<View style={useNativeCssStyle("container")}>
|
|
134
|
+
<Text style={useNativeCssStyle("my-text")}>
|
|
135
|
+
Hello, world!
|
|
136
|
+
</Text>
|
|
137
|
+
</View>
|
|
138
|
+
)
|
|
139
|
+
}
|
|
55
140
|
```
|
|
56
141
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
margin-top: 65px;
|
|
80
|
-
align-items: center;
|
|
81
|
-
display: block;
|
|
82
|
-
}
|
|
83
|
-
`;
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
<View style={styles.container}>
|
|
87
|
-
<Text style={styles.description}>
|
|
88
|
-
Search!
|
|
89
|
-
</Text>
|
|
90
|
-
</View>
|
|
91
|
-
);
|
|
92
|
-
}
|
|
142
|
+
> [!IMPORTANT]
|
|
143
|
+
> This hook may will only work on native platforms. It will return an empty object on web.
|
|
144
|
+
> This hook may not support all features of the library.
|
|
145
|
+
> This hooks does not support container queries or inheritance for children elements.
|
|
146
|
+
|
|
147
|
+
#### `useNativeCssVariable`
|
|
148
|
+
|
|
149
|
+
If you just require a CSS variable value, you can use the `useNativeCssVariable` hook:
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
import { useNativeCssVariable } from 'react-native-css';
|
|
153
|
+
|
|
154
|
+
export default function App() {
|
|
155
|
+
const myColor = useNativeCssVariable("my-color");
|
|
156
|
+
|
|
157
|
+
return (
|
|
158
|
+
<View style={{ backgroundColor: myColor }}>
|
|
159
|
+
<Text style={{ color: myColor }}>
|
|
160
|
+
Hello, world!
|
|
161
|
+
</Text>
|
|
162
|
+
</View>
|
|
163
|
+
)
|
|
93
164
|
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
> [!IMPORTANT]
|
|
168
|
+
> This hook may will only work on native platforms. It will return `undefined` on web.
|
|
169
|
+
> This hook may not support all features of the library.
|
|
94
170
|
|
|
171
|
+
## Contributing
|
|
172
|
+
|
|
173
|
+
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
174
|
+
|
|
175
|
+
To quickly get started with the project, you can run:
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
yarn init -2 # We require Yarn 4
|
|
179
|
+
yarn clean # Install dependencies, rebuild the project and example app
|
|
180
|
+
yarn example ios # Or yarn example android
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Once the example app is built, you can use
|
|
184
|
+
|
|
185
|
+
```sh
|
|
186
|
+
yarn example start # Start Expo CLI
|
|
187
|
+
yarn example start:build # Rebuild the project and start Expo CLI
|
|
188
|
+
yarn example start:debug # Rebuild the project and start Expo CLI with debug logging
|
|
95
189
|
```
|
|
190
|
+
|
|
191
|
+
> [!TIP]
|
|
192
|
+
> `start:build` and `start:debug` will clear the cache before starting the Expo CLI. If you are experiencing issue with `yarn example start` not reflecting your changes, try running `yarn example start:build` or `yarn example start:debug`.
|
|
193
|
+
|
|
194
|
+
## License
|
|
195
|
+
|
|
196
|
+
MIT
|
|
197
|
+
|
|
198
|
+
See the [license](LICENSE) file for more details.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.allowedModules = void 0;
|
|
7
|
+
var _fs = require("fs");
|
|
8
|
+
var _path = require("path");
|
|
9
|
+
function getFilesWithoutExtension(dirPath) {
|
|
10
|
+
// Read all files and directories inside dirPath synchronously
|
|
11
|
+
const entries = (0, _fs.readdirSync)(dirPath, {
|
|
12
|
+
withFileTypes: true
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// Filter only files (ignore directories)
|
|
16
|
+
const files = entries.filter(entry => entry.isFile() && /\.[jt]sx?$/.exec(entry.name) && !/index\.[jt]sx?$/.exec(entry.name));
|
|
17
|
+
|
|
18
|
+
// For each file, get the filename without extension
|
|
19
|
+
const filesWithoutExt = files.map(file => (0, _path.parse)(file.name).name);
|
|
20
|
+
return filesWithoutExt;
|
|
21
|
+
}
|
|
22
|
+
const allowedModules = exports.allowedModules = new Set(getFilesWithoutExtension((0, _path.join)(__dirname, "../components")));
|
|
23
|
+
//# sourceMappingURL=allowedModules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_fs","require","_path","getFilesWithoutExtension","dirPath","entries","readdirSync","withFileTypes","files","filter","entry","isFile","exec","name","filesWithoutExt","map","file","parse","allowedModules","exports","Set","join","__dirname"],"sourceRoot":"../../../src","sources":["babel/allowedModules.ts"],"mappings":";;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,SAASE,wBAAwBA,CAACC,OAAe,EAAE;EACjD;EACA,MAAMC,OAAO,GAAG,IAAAC,eAAW,EAACF,OAAO,EAAE;IAAEG,aAAa,EAAE;EAAK,CAAC,CAAC;;EAE7D;EACA,MAAMC,KAAK,GAAGH,OAAO,CAACI,MAAM,CACzBC,KAAK,IACJA,KAAK,CAACC,MAAM,CAAC,CAAC,IACd,YAAY,CAACC,IAAI,CAACF,KAAK,CAACG,IAAI,CAAC,IAC7B,CAAC,iBAAiB,CAACD,IAAI,CAACF,KAAK,CAACG,IAAI,CACtC,CAAC;;EAED;EACA,MAAMC,eAAe,GAAGN,KAAK,CAACO,GAAG,CAAEC,IAAI,IAAK,IAAAC,WAAK,EAACD,IAAI,CAACH,IAAI,CAAC,CAACA,IAAI,CAAC;EAElE,OAAOC,eAAe;AACxB;AAEO,MAAMI,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAIE,GAAG,CACnCjB,wBAAwB,CAAC,IAAAkB,UAAI,EAACC,SAAS,EAAE,eAAe,CAAC,CAC3D,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getInteropRequireDefaultSource = getInteropRequireDefaultSource;
|
|
7
|
+
function getInteropRequireDefaultSource(init, t) {
|
|
8
|
+
if (!t.isIdentifier(init.callee, {
|
|
9
|
+
name: "_interopRequireDefault"
|
|
10
|
+
})) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const interopArg = init.arguments.at(0);
|
|
14
|
+
if (!t.isCallExpression(interopArg) || !t.isIdentifier(interopArg.callee, {
|
|
15
|
+
name: "require"
|
|
16
|
+
})) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const requireArg = interopArg.arguments.at(0);
|
|
20
|
+
if (!t.isStringLiteral(requireArg)) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
return requireArg.value;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getInteropRequireDefaultSource","init","t","isIdentifier","callee","name","interopArg","arguments","at","isCallExpression","requireArg","isStringLiteral","value"],"sourceRoot":"../../../src","sources":["babel/helpers.ts"],"mappings":";;;;;;AAeO,SAASA,8BAA8BA,CAC5CC,IAAoB,EACpBC,CAAa,EACb;EACA,IAAI,CAACA,CAAC,CAACC,YAAY,CAACF,IAAI,CAACG,MAAM,EAAE;IAAEC,IAAI,EAAE;EAAyB,CAAC,CAAC,EAAE;IACpE;EACF;EAEA,MAAMC,UAAU,GAAGL,IAAI,CAACM,SAAS,CAACC,EAAE,CAAC,CAAC,CAAC;EAEvC,IACE,CAACN,CAAC,CAACO,gBAAgB,CAACH,UAAU,CAAC,IAC/B,CAACJ,CAAC,CAACC,YAAY,CAACG,UAAU,CAACF,MAAM,EAAE;IAAEC,IAAI,EAAE;EAAU,CAAC,CAAC,EACvD;IACA;EACF;EAEA,MAAMK,UAAU,GAAGJ,UAAU,CAACC,SAAS,CAACC,EAAE,CAAC,CAAC,CAAC;EAE7C,IAAI,CAACN,CAAC,CAACS,eAAe,CAACD,UAAU,CAAC,EAAE;IAClC;EACF;EAEA,OAAOA,UAAU,CAACE,KAAK;AACzB","ignoreList":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
var _path = require("path");
|
|
8
|
+
var _helpers = require("./helpers.js");
|
|
9
|
+
var _reactNative = require("./react-native.js");
|
|
10
|
+
var _reactNativeWeb = require("./react-native-web.js");
|
|
11
|
+
function _default({
|
|
12
|
+
types: t
|
|
13
|
+
}) {
|
|
14
|
+
const processed = new WeakSet();
|
|
15
|
+
const thisModuleDist = (0, _path.resolve)(__dirname, "../../../dist");
|
|
16
|
+
const thisModuleSrc = (0, _path.resolve)(__dirname, "../../../src");
|
|
17
|
+
function isFromThisModule(filename) {
|
|
18
|
+
return filename.startsWith(thisModuleDist) || filename.startsWith(thisModuleSrc);
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
name: "Rewrite react-native to react-native-css",
|
|
22
|
+
visitor: {
|
|
23
|
+
ImportDeclaration(path, state) {
|
|
24
|
+
if (processed.has(path) || processed.has(path.node) || isFromThisModule(state.filename)) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const statements = (0, _reactNative.handleReactNativeImport)(path.node, t, state.filename) ?? (0, _reactNativeWeb.handleReactNativeWebImport)(path.node, t, state.filename);
|
|
28
|
+
if (!statements) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
for (const statement of statements) {
|
|
32
|
+
processed.add(statement);
|
|
33
|
+
}
|
|
34
|
+
path.replaceWithMultiple(statements);
|
|
35
|
+
},
|
|
36
|
+
VariableDeclaration(path, state) {
|
|
37
|
+
if (processed.has(path) || processed.has(path.node) || isFromThisModule(state.filename)) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const firstDeclaration = path.node.declarations.at(0);
|
|
41
|
+
|
|
42
|
+
// We only handle single variable declarations for now.
|
|
43
|
+
if (path.node.declarations.length > 1) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Skip declarations that are not initialized. eg `let x;`
|
|
48
|
+
if (!firstDeclaration?.init) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const {
|
|
52
|
+
id,
|
|
53
|
+
init
|
|
54
|
+
} = firstDeclaration;
|
|
55
|
+
|
|
56
|
+
// We only handle `const <id> = <init>()`
|
|
57
|
+
if (!t.isCallExpression(init)) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// We only handle `const id = <init>() OR const { <id> } = <init>()`
|
|
62
|
+
if (!(t.isIdentifier(id) || t.isObjectPattern(id))) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const initArg = init.arguments.at(0);
|
|
66
|
+
if (!initArg) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
let statements;
|
|
70
|
+
|
|
71
|
+
// `const <id> = require(<source>);`
|
|
72
|
+
if (t.isIdentifier(id) && t.isIdentifier(init.callee, {
|
|
73
|
+
name: "require"
|
|
74
|
+
}) && t.isStringLiteral(initArg)) {
|
|
75
|
+
statements = (0, _reactNative.handleReactNativeIdentifierRequire)(path, t, id.name, initArg.value, state.filename) ?? (0, _reactNativeWeb.handleReactNativeWebIdentifierRequire)(path, t, id.name, initArg.value, state.filename);
|
|
76
|
+
} else if (t.isObjectPattern(id) && t.isIdentifier(init.callee, {
|
|
77
|
+
name: "require"
|
|
78
|
+
}) && t.isStringLiteral(initArg)) {
|
|
79
|
+
statements = (0, _reactNative.handleReactNativeObjectPatternRequire)(path, t, id, initArg.value, state.filename) ?? (0, _reactNativeWeb.handleReactNativeWebObjectPatternRequire)(path, t, id, initArg.value, state.filename);
|
|
80
|
+
} else if (t.isIdentifier(id) && t.isIdentifier(init.callee, {
|
|
81
|
+
name: "_interopRequireDefault"
|
|
82
|
+
})) {
|
|
83
|
+
// `const <id> = _interopRequireDefault(require(<source>));`
|
|
84
|
+
const source = (0, _helpers.getInteropRequireDefaultSource)(init, t);
|
|
85
|
+
if (!source) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
statements = (0, _reactNativeWeb.handleReactNativeWebIdentifierRequire)(path, t, id.name, source, state.filename);
|
|
89
|
+
}
|
|
90
|
+
if (!statements) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
for (const statement of statements) {
|
|
94
|
+
processed.add(statement);
|
|
95
|
+
}
|
|
96
|
+
path.replaceWithMultiple(statements);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=import-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_path","require","_helpers","_reactNative","_reactNativeWeb","_default","types","t","processed","WeakSet","thisModuleDist","resolve","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","name","visitor","ImportDeclaration","path","state","has","node","statements","handleReactNativeImport","handleReactNativeWebImport","statement","add","replaceWithMultiple","VariableDeclaration","firstDeclaration","declarations","at","length","init","id","isCallExpression","isIdentifier","isObjectPattern","initArg","arguments","callee","isStringLiteral","handleReactNativeIdentifierRequire","value","handleReactNativeWebIdentifierRequire","handleReactNativeObjectPatternRequire","handleReactNativeWebObjectPatternRequire","source","getInteropRequireDefaultSource"],"sourceRoot":"../../../src","sources":["babel/import-plugin.ts"],"mappings":";;;;;;AAA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ports","plugins","require","default"],"sourceRoot":"../../../src","sources":["babel/index.ts"],"mappings":";;AAAA;AACAA,MAAM,CAACC,OAAO,GAAG,YAAY;EAC3B,OAAO;IACLC,OAAO,EAAE,CACPC,OAAO,CAAC,iBAAiB,CAAC,CAACC,OAAO,EAClC,8BAA8B;EAElC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.handleReactNativeWebIdentifierRequire = handleReactNativeWebIdentifierRequire;
|
|
7
|
+
exports.handleReactNativeWebImport = handleReactNativeWebImport;
|
|
8
|
+
exports.handleReactNativeWebObjectPatternRequire = handleReactNativeWebObjectPatternRequire;
|
|
9
|
+
var _path = require("path");
|
|
10
|
+
var _allowedModules = require("./allowedModules.js");
|
|
11
|
+
function parseReactNativeWebSource(source, filename) {
|
|
12
|
+
if (source.startsWith(".")) {
|
|
13
|
+
source = (0, _path.resolve)(filename, source);
|
|
14
|
+
const internalPath = source.split("react-native-web/dist")[1];
|
|
15
|
+
if (!internalPath) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Strip the absolute system filepath
|
|
20
|
+
source = `react-native-web/${internalPath}`;
|
|
21
|
+
}
|
|
22
|
+
if (source === "react-native-web") {
|
|
23
|
+
return {
|
|
24
|
+
source: "react-native-css/components"
|
|
25
|
+
};
|
|
26
|
+
} else if (source.startsWith("react-native-web/")) {
|
|
27
|
+
const name = source.split("/").at(-1);
|
|
28
|
+
if (!name || !_allowedModules.allowedModules.has(name)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
source: `react-native-css/components/${name}`,
|
|
33
|
+
name
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
function handleReactNativeWebImport(declaration, t, filename) {
|
|
39
|
+
const {
|
|
40
|
+
specifiers,
|
|
41
|
+
source
|
|
42
|
+
} = declaration;
|
|
43
|
+
const rnwSource = parseReactNativeWebSource(source.value, filename);
|
|
44
|
+
if (!rnwSource) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (specifiers.length === 0) {
|
|
48
|
+
return [t.importDeclaration([], t.stringLiteral("react-native-css/components"))];
|
|
49
|
+
}
|
|
50
|
+
const statements = [];
|
|
51
|
+
for (const specifier of specifiers) {
|
|
52
|
+
if (t.isImportDefaultSpecifier(specifier)) {
|
|
53
|
+
const {
|
|
54
|
+
source: newSource,
|
|
55
|
+
name
|
|
56
|
+
} = rnwSource;
|
|
57
|
+
if (!name) {
|
|
58
|
+
statements.push(t.importDeclaration([t.importDefaultSpecifier(specifier.local)], t.stringLiteral(newSource)));
|
|
59
|
+
} else {
|
|
60
|
+
statements.push(t.importDeclaration([t.importSpecifier(specifier.local, specifier.local)], t.stringLiteral(`react-native-css/components/${name}`)));
|
|
61
|
+
}
|
|
62
|
+
} else if (t.isImportNamespaceSpecifier(specifier)) {
|
|
63
|
+
statements.push(t.importDeclaration([specifier], t.stringLiteral("react-native-css/components")));
|
|
64
|
+
} else {
|
|
65
|
+
const localName = t.isStringLiteral(specifier.imported) ? specifier.imported.value : specifier.imported.name;
|
|
66
|
+
if (!_allowedModules.allowedModules.has(localName)) {
|
|
67
|
+
statements.push(t.importDeclaration([specifier], source));
|
|
68
|
+
} else {
|
|
69
|
+
statements.push(t.importDeclaration([t.importSpecifier(specifier.local, specifier.imported)], t.stringLiteral(`react-native-css/components/${localName}`)));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return statements;
|
|
74
|
+
}
|
|
75
|
+
function handleReactNativeWebIdentifierRequire(path, t, id, source, filename) {
|
|
76
|
+
const parsedSource = parseReactNativeWebSource(source, filename);
|
|
77
|
+
if (!parsedSource) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const {
|
|
81
|
+
source: newSource,
|
|
82
|
+
name
|
|
83
|
+
} = parsedSource;
|
|
84
|
+
if (name) {
|
|
85
|
+
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)]))])];
|
|
86
|
+
} else {
|
|
87
|
+
return [t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.identifier(id), t.callExpression(t.identifier("require"), [t.stringLiteral(newSource)]))])];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function handleReactNativeWebObjectPatternRequire(path, t, id, source, filename) {
|
|
91
|
+
const parsedSource = parseReactNativeWebSource(source, filename);
|
|
92
|
+
|
|
93
|
+
// Don't handle `const { Text } = require('react-native-web/dist/cjs/Text');` - we only handle package exports
|
|
94
|
+
if (!parsedSource || parsedSource.name) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const statements = [];
|
|
98
|
+
for (const identifier of id.properties) {
|
|
99
|
+
if (t.isRestElement(identifier)) {
|
|
100
|
+
// Bail out on `const { ...rest } = require('react-native-web');`
|
|
101
|
+
// We need to exit as we do not handle `const { Text, ...rest } = require('react-native-web');`
|
|
102
|
+
return;
|
|
103
|
+
} else if (!(t.isIdentifier(identifier.value) && t.isIdentifier(identifier.key))) {
|
|
104
|
+
// Bail out on anything that isn't `const { <key>: <identifier> } = require('react-native-web');`
|
|
105
|
+
return;
|
|
106
|
+
} else {
|
|
107
|
+
const name = identifier.key.name;
|
|
108
|
+
if (!_allowedModules.allowedModules.has(name)) {
|
|
109
|
+
statements.push(t.variableDeclaration(path.node.kind, [t.variableDeclarator(t.objectPattern([identifier]), t.callExpression(t.identifier("require"), [t.stringLiteral(source)]))]));
|
|
110
|
+
} else {
|
|
111
|
+
const newSourceWithName = `react-native-css/components/${name}`;
|
|
112
|
+
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)]))]));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return statements;
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=react-native-web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_path","require","_allowedModules","parseReactNativeWebSource","source","filename","startsWith","resolve","internalPath","split","name","at","allowedModules","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,IAAAA,KAAA,GAAAC,OAAA;AAUA,IAAAC,eAAA,GAAAD,OAAA;AAIA,SAASE,yBAAyBA,CAACC,MAAc,EAAEC,QAAgB,EAAE;EACnE,IAAID,MAAM,CAACE,UAAU,CAAC,GAAG,CAAC,EAAE;IAC1BF,MAAM,GAAG,IAAAG,aAAO,EAACF,QAAQ,EAAED,MAAM,CAAC;IAElC,MAAMI,YAAY,GAAGJ,MAAM,CAACK,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;IAC7D,IAAI,CAACD,YAAY,EAAE;MACjB;IACF;;IAEA;IACAJ,MAAM,GAAG,oBAAoBI,YAAY,EAAE;EAC7C;EAEA,IAAIJ,MAAM,KAAK,kBAAkB,EAAE;IACjC,OAAO;MAAEA,MAAM,EAAE;IAA8B,CAAC;EAClD,CAAC,MAAM,IAAIA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