react-native-css 3.0.0-nightly.4723140 → 3.0.0-nightly.4af17f5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +184 -1
- package/dist/commonjs/babel/allowedModules.js +23 -0
- package/dist/commonjs/babel/allowedModules.js.map +1 -0
- package/dist/commonjs/babel/helpers.js +18 -122
- package/dist/commonjs/babel/helpers.js.map +1 -1
- package/dist/commonjs/babel/import-plugin.js +62 -58
- package/dist/commonjs/babel/import-plugin.js.map +1 -1
- 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 +105 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -0
- package/dist/commonjs/compiler/attributes.test.js +20 -0
- package/dist/commonjs/compiler/attributes.test.js.map +1 -0
- package/dist/commonjs/compiler/compiler.js +158 -350
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/compiler.types.js.map +1 -1
- package/dist/commonjs/compiler/container-query.js +10 -10
- package/dist/commonjs/compiler/container-query.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +1337 -989
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- 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 +15 -24
- package/dist/commonjs/compiler/keyframes.js.map +1 -1
- package/dist/commonjs/compiler/media-query.js +22 -22
- package/dist/commonjs/compiler/media-query.js.map +1 -1
- package/dist/commonjs/compiler/selector-builder.js +457 -0
- package/dist/commonjs/compiler/selector-builder.js.map +1 -0
- package/dist/commonjs/compiler/selectors.js +270 -186
- package/dist/commonjs/compiler/selectors.js.map +1 -1
- 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 +459 -0
- package/dist/commonjs/compiler/stylesheet.js.map +1 -0
- package/dist/commonjs/components/Text.js +2 -0
- package/dist/commonjs/components/Text.js.map +1 -1
- package/dist/commonjs/components/View.js +2 -0
- package/dist/commonjs/components/View.js.map +1 -1
- package/dist/commonjs/index.js +11 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/jest/index.js +25 -25
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/index.js +111 -50
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/injection-code.js +24 -4
- package/dist/commonjs/metro/injection-code.js.map +1 -1
- package/dist/commonjs/metro/resolver.js +62 -0
- package/dist/commonjs/metro/resolver.js.map +1 -0
- package/dist/commonjs/metro/typescript.js +1 -1
- package/dist/commonjs/poison.pill.js +39 -0
- package/dist/commonjs/poison.pill.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 +28 -21
- package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/guards.js +10 -4
- package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/index.js +10 -46
- package/dist/commonjs/runtime/native/conditions/index.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/media-query.js +18 -16
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/runtime/native/index.js +11 -1
- package/dist/commonjs/runtime/native/index.js.map +1 -1
- package/dist/commonjs/runtime/native/injection.js +21 -2
- package/dist/commonjs/runtime/native/injection.js.map +1 -1
- package/dist/commonjs/runtime/native/react/interaction.js +10 -10
- package/dist/commonjs/runtime/native/react/interaction.js.map +1 -1
- package/dist/commonjs/runtime/native/react/rules.js +32 -36
- package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
- package/dist/commonjs/runtime/native/react/useNativeCss.js +1 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
- package/dist/commonjs/runtime/native/reactivity.js +2 -17
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
- 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/animation.js +70 -72
- package/dist/commonjs/runtime/native/styles/animation.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/border.js +12 -0
- package/dist/commonjs/runtime/native/styles/border.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js +40 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calc.js +33 -61
- package/dist/commonjs/runtime/native/styles/calc.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/calculate-props.js +128 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/constants.js +2 -1
- package/dist/commonjs/runtime/native/styles/constants.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/filters.js +84 -0
- package/dist/commonjs/runtime/native/styles/filters.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/index.js +14 -122
- package/dist/commonjs/runtime/native/styles/index.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/platform-functions.js +46 -0
- package/dist/commonjs/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +46 -13
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/shorthand.js +34 -17
- package/dist/commonjs/runtime/native/styles/shorthand.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/transform.js +9 -3
- package/dist/commonjs/runtime/native/styles/transform.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/units.js +12 -6
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/variables.js +58 -36
- package/dist/commonjs/runtime/native/styles/variables.js.map +1 -1
- package/dist/commonjs/runtime/utils/objects.js +18 -5
- package/dist/commonjs/runtime/utils/objects.js.map +1 -1
- package/dist/commonjs/runtime/utils/specificity.js +2 -1
- package/dist/commonjs/runtime/utils/specificity.js.map +1 -1
- package/dist/commonjs/runtime/utils/style-value.js +7 -0
- package/dist/commonjs/runtime/utils/style-value.js.map +1 -1
- package/dist/commonjs/runtime/web/index.js +1 -0
- package/dist/commonjs/runtime/web/index.js.map +1 -1
- 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 +17 -116
- package/dist/module/babel/helpers.js.map +1 -1
- package/dist/module/babel/import-plugin.js +63 -59
- package/dist/module/babel/import-plugin.js.map +1 -1
- 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 +101 -0
- package/dist/module/compiler/atRules.js.map +1 -0
- package/dist/module/compiler/attributes.test.js +20 -0
- package/dist/module/compiler/attributes.test.js.map +1 -0
- package/dist/module/compiler/compiler.js +158 -350
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js +0 -12
- package/dist/module/compiler/compiler.types.js.map +1 -1
- package/dist/module/compiler/container-query.js +10 -10
- package/dist/module/compiler/container-query.js.map +1 -1
- package/dist/module/compiler/declarations.js +1275 -993
- package/dist/module/compiler/declarations.js.map +1 -1
- 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 +15 -24
- package/dist/module/compiler/keyframes.js.map +1 -1
- package/dist/module/compiler/media-query.js +22 -22
- package/dist/module/compiler/media-query.js.map +1 -1
- package/dist/module/compiler/selector-builder.js +452 -0
- package/dist/module/compiler/selector-builder.js.map +1 -0
- package/dist/module/compiler/selectors.js +270 -186
- package/dist/module/compiler/selectors.js.map +1 -1
- 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 +454 -0
- package/dist/module/compiler/stylesheet.js.map +1 -0
- package/dist/module/components/Text.js +1 -0
- package/dist/module/components/Text.js.map +1 -1
- package/dist/module/components/View.js +1 -0
- package/dist/module/components/View.js.map +1 -1
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/jest/index.js +26 -10
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/index.js +111 -50
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/injection-code.js +22 -3
- package/dist/module/metro/injection-code.js.map +1 -1
- package/dist/module/metro/resolver.js +57 -0
- package/dist/module/metro/resolver.js.map +1 -0
- package/dist/module/metro/typescript.js +1 -1
- package/dist/module/poison.pill.js +37 -0
- package/dist/module/poison.pill.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 +28 -21
- package/dist/module/runtime/native/conditions/container-query.js.map +1 -1
- package/dist/module/runtime/native/conditions/guards.js +10 -4
- package/dist/module/runtime/native/conditions/guards.js.map +1 -1
- package/dist/module/runtime/native/conditions/index.js +10 -46
- package/dist/module/runtime/native/conditions/index.js.map +1 -1
- package/dist/module/runtime/native/conditions/media-query.js +18 -16
- package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
- package/dist/module/runtime/native/index.js +1 -2
- package/dist/module/runtime/native/index.js.map +1 -1
- package/dist/module/runtime/native/injection.js +20 -1
- package/dist/module/runtime/native/injection.js.map +1 -1
- package/dist/module/runtime/native/react/interaction.js +10 -10
- package/dist/module/runtime/native/react/interaction.js.map +1 -1
- package/dist/module/runtime/native/react/rules.js +31 -36
- package/dist/module/runtime/native/react/rules.js.map +1 -1
- package/dist/module/runtime/native/react/useNativeCss.js +1 -0
- package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
- package/dist/module/runtime/native/reactivity.js +1 -16
- package/dist/module/runtime/native/reactivity.js.map +1 -1
- 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/animation.js +68 -71
- package/dist/module/runtime/native/styles/animation.js.map +1 -1
- package/dist/module/runtime/native/styles/border.js +8 -0
- package/dist/module/runtime/native/styles/border.js.map +1 -0
- package/dist/module/runtime/native/styles/box-shadow.js +35 -0
- package/dist/module/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/calc.js +33 -62
- package/dist/module/runtime/native/styles/calc.js.map +1 -1
- package/dist/module/runtime/native/styles/calculate-props.js +123 -0
- package/dist/module/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/module/runtime/native/styles/constants.js +1 -0
- package/dist/module/runtime/native/styles/constants.js.map +1 -1
- package/dist/module/runtime/native/styles/filters.js +70 -0
- package/dist/module/runtime/native/styles/filters.js.map +1 -0
- package/dist/module/runtime/native/styles/index.js +14 -122
- package/dist/module/runtime/native/styles/index.js.map +1 -1
- package/dist/module/runtime/native/styles/platform-functions.js +36 -0
- package/dist/module/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +47 -14
- package/dist/module/runtime/native/styles/resolve.js.map +1 -1
- package/dist/module/runtime/native/styles/shorthand.js +34 -17
- package/dist/module/runtime/native/styles/shorthand.js.map +1 -1
- package/dist/module/runtime/native/styles/transform.js +9 -3
- package/dist/module/runtime/native/styles/transform.js.map +1 -1
- package/dist/module/runtime/native/styles/units.js +12 -6
- package/dist/module/runtime/native/styles/units.js.map +1 -1
- package/dist/module/runtime/native/styles/variables.js +59 -37
- package/dist/module/runtime/native/styles/variables.js.map +1 -1
- package/dist/module/runtime/utils/objects.js +16 -4
- package/dist/module/runtime/utils/objects.js.map +1 -1
- package/dist/module/runtime/utils/specificity.js +2 -1
- package/dist/module/runtime/utils/specificity.js.map +1 -1
- package/dist/module/runtime/utils/style-value.js +6 -0
- package/dist/module/runtime/utils/style-value.js.map +1 -1
- package/dist/module/runtime/web/index.js +2 -0
- package/dist/module/runtime/web/index.js.map +1 -1
- 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.map +1 -1
- 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 +3 -8
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +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/attributes.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +9 -2
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +32 -112
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts +2 -2
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +115 -25
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- 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 +5 -4
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +4 -4
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +23 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts +11 -5
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -1
- 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/components/Text.d.ts +1 -1
- package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/View.d.ts +1 -1
- package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts +11 -5
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/index.d.ts +5 -4
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts +15 -1
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -1
- 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/poison.pill.d.ts +2 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +1 -1
- 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 +3 -3
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts +1 -1
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +2 -1
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +3 -2
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +3 -11
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
- 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/animation.d.ts +3 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +1 -1
- 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 +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts +12 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts +3 -4
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +6 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts +3 -4
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts +0 -15
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts +1 -1
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts +2 -1
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts +3 -2
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts.map +1 -1
- 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.map +1 -1
- 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 +3 -8
- package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -1
- package/dist/typescript/module/src/babel/react-native-web.d.ts +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/attributes.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts +9 -2
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +32 -112
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/container-query.d.ts +2 -2
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +115 -25
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- 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 +5 -4
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/media-query.d.ts +4 -4
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +23 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts +11 -5
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
- 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/components/Text.d.ts +1 -1
- package/dist/typescript/module/src/components/Text.d.ts.map +1 -1
- package/dist/typescript/module/src/components/View.d.ts +1 -1
- package/dist/typescript/module/src/components/View.d.ts.map +1 -1
- package/dist/typescript/module/src/index.d.ts +1 -0
- package/dist/typescript/module/src/index.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts +11 -5
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/index.d.ts +5 -4
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/injection-code.d.ts +15 -1
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -1
- 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/poison.pill.d.ts +2 -0
- package/dist/typescript/module/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts +1 -1
- 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 +3 -3
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/index.d.ts +1 -1
- package/dist/typescript/module/src/runtime/native/index.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts +2 -1
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +3 -2
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +3 -11
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
- 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/animation.d.ts +3 -2
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +1 -1
- 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 +1 -0
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts +12 -0
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts +3 -4
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +6 -2
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts +3 -4
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +1 -1
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts +1 -1
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/runtime.types.d.ts +0 -15
- package/dist/typescript/module/src/runtime/runtime.types.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/utils/components.d.ts +1 -1
- package/dist/typescript/module/src/runtime/utils/objects.d.ts +2 -1
- package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts +1 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts +3 -2
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/web/index.d.ts +1 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts.map +1 -1
- 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 +69 -14
- package/src/babel/allowedModules.ts +24 -0
- package/src/babel/helpers.ts +16 -158
- package/src/babel/import-plugin.ts +125 -132
- 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/attributes.test.ts +28 -0
- package/src/compiler/compiler.ts +163 -492
- package/src/compiler/compiler.types.ts +37 -140
- package/src/compiler/container-query.ts +12 -12
- package/src/compiler/declarations.ts +2010 -1961
- package/src/compiler/inheritance.test.ts +121 -0
- package/src/compiler/keyframes.ts +28 -42
- package/src/compiler/media-query.ts +27 -26
- package/src/compiler/selector-builder.ts +531 -0
- package/src/compiler/selectors.ts +304 -272
- package/src/compiler/split-by-delimiter.ts +19 -0
- package/src/compiler/stylesheet.ts +658 -0
- package/src/components/Text.tsx +2 -0
- package/src/components/View.tsx +2 -0
- package/src/index.ts +2 -0
- package/src/jest/index.ts +36 -11
- package/src/metro/index.ts +164 -64
- package/src/metro/injection-code.ts +33 -3
- package/src/metro/resolver.ts +89 -0
- package/src/metro/typescript.ts +1 -1
- package/src/poison.pill.ts +36 -0
- package/src/runtime/native/conditions/attributes.ts +52 -0
- package/src/runtime/native/conditions/container-query.ts +27 -22
- package/src/runtime/native/conditions/guards.ts +13 -6
- package/src/runtime/native/conditions/index.ts +12 -66
- package/src/runtime/native/conditions/media-query.ts +19 -19
- package/src/runtime/native/index.ts +1 -2
- package/src/runtime/native/injection.ts +31 -1
- package/src/runtime/native/react/interaction.ts +12 -12
- package/src/runtime/native/react/rules.ts +35 -42
- package/src/runtime/native/react/useNativeCss.ts +3 -0
- package/src/runtime/native/reactivity.ts +5 -28
- package/src/runtime/native/root.ts +31 -0
- package/src/runtime/native/styles/animation.ts +143 -104
- package/src/runtime/native/styles/border.ts +10 -0
- package/src/runtime/native/styles/box-shadow.ts +54 -0
- package/src/runtime/native/styles/calc.ts +37 -60
- package/src/runtime/native/styles/calculate-props.ts +175 -0
- package/src/runtime/native/styles/constants.ts +1 -0
- package/src/runtime/native/styles/filters.ts +98 -0
- package/src/runtime/native/styles/index.ts +14 -150
- package/src/runtime/native/styles/platform-functions.ts +50 -0
- package/src/runtime/native/styles/resolve.ts +91 -17
- package/src/runtime/native/styles/shorthand.ts +61 -41
- package/src/runtime/native/styles/transform.ts +10 -4
- package/src/runtime/native/styles/units.ts +15 -6
- package/src/runtime/native/styles/variables.ts +53 -41
- package/src/runtime/runtime.types.ts +0 -25
- package/src/runtime/utils/objects.ts +20 -5
- package/src/runtime/utils/specificity.ts +1 -0
- package/src/runtime/utils/style-value.ts +14 -2
- package/src/runtime/web/index.ts +3 -0
- package/src/runtime/web/metro.ts +2 -0
- package/types.d.ts +70 -0
- package/dist/commonjs/compiler/add.js +0 -175
- package/dist/commonjs/compiler/add.js.map +0 -1
- package/dist/commonjs/components/ActivityIndicator.js +0 -20
- package/dist/commonjs/components/ActivityIndicator.js.map +0 -1
- package/dist/commonjs/components/SafeAreaProvider/index.js +0 -41
- package/dist/commonjs/components/SafeAreaProvider/index.js.map +0 -1
- package/dist/commonjs/components/SafeAreaProvider/index.web.js +0 -13
- package/dist/commonjs/components/SafeAreaProvider/index.web.js.map +0 -1
- package/dist/commonjs/components/TextInput.js +0 -20
- package/dist/commonjs/components/TextInput.js.map +0 -1
- package/dist/module/compiler/add.js +0 -168
- package/dist/module/compiler/add.js.map +0 -1
- package/dist/module/components/ActivityIndicator.js +0 -16
- package/dist/module/components/ActivityIndicator.js.map +0 -1
- package/dist/module/components/SafeAreaProvider/index.js +0 -36
- package/dist/module/components/SafeAreaProvider/index.js.map +0 -1
- package/dist/module/components/SafeAreaProvider/index.web.js +0 -4
- package/dist/module/components/SafeAreaProvider/index.web.js.map +0 -1
- package/dist/module/components/TextInput.js +0 -16
- package/dist/module/components/TextInput.js.map +0 -1
- package/dist/typescript/commonjs/src/compiler/add.d.ts +0 -10
- package/dist/typescript/commonjs/src/compiler/add.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +0 -3
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.d.ts +0 -4
- package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.web.d.ts +0 -2
- package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.web.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/components/TextInput.d.ts +0 -13
- package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +0 -1
- package/dist/typescript/module/src/compiler/add.d.ts +0 -10
- package/dist/typescript/module/src/compiler/add.d.ts.map +0 -1
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts +0 -3
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +0 -1
- package/dist/typescript/module/src/components/SafeAreaProvider/index.d.ts +0 -4
- package/dist/typescript/module/src/components/SafeAreaProvider/index.d.ts.map +0 -1
- package/dist/typescript/module/src/components/SafeAreaProvider/index.web.d.ts +0 -2
- package/dist/typescript/module/src/components/SafeAreaProvider/index.web.d.ts.map +0 -1
- package/dist/typescript/module/src/components/TextInput.d.ts +0 -13
- package/dist/typescript/module/src/components/TextInput.d.ts.map +0 -1
- package/src/compiler/add.ts +0 -257
- package/src/components/ActivityIndicator.tsx +0 -19
- package/src/components/SafeAreaProvider/index.tsx +0 -50
- package/src/components/SafeAreaProvider/index.web.tsx +0 -1
- package/src/components/TextInput.tsx +0 -20
package/README.md
CHANGED
|
@@ -1,19 +1,202 @@
|
|
|
1
1
|
# react-native-css
|
|
2
2
|
|
|
3
|
-
A CSS polyfill for React Native
|
|
3
|
+
A CSS polyfill for React Native
|
|
4
|
+
|
|
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.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
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.
|
|
12
|
+
|
|
13
|
+
### Metro based projects
|
|
14
|
+
|
|
15
|
+
> [!TIP]
|
|
16
|
+
> All Expo and React Native Community CLI projects use Metro as the bundler, so this guide applies to them.
|
|
17
|
+
|
|
18
|
+
You will need to add `withReactNativeCSS` to your Metro configuration.
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { getDefaultConfig } from "expo/metro-config";
|
|
22
|
+
import { withReactNativeCSS } from "react-native-css/metro";
|
|
23
|
+
|
|
24
|
+
const defaultConfig = getDefaultConfig(__dirname);
|
|
25
|
+
|
|
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
|
+
|
|
7
40
|
## Usage
|
|
8
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
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
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
|
+
);
|
|
89
|
+
```
|
|
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
|
+
});
|
|
105
|
+
|
|
106
|
+
const Box = useCssElement(RNView, {
|
|
107
|
+
className: "container",
|
|
108
|
+
});
|
|
109
|
+
|
|
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
|
|
120
|
+
|
|
121
|
+
#### `useNativeCssStyle`
|
|
122
|
+
|
|
123
|
+
If you just require the style object, you can use the `useNativeCssStyle` hook:
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
import { View as RNView } from 'react-native';
|
|
127
|
+
import { useNativeCssStyle } from 'react-native-css';
|
|
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
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
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
|
+
)
|
|
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.
|
|
170
|
+
|
|
9
171
|
## Contributing
|
|
10
172
|
|
|
11
173
|
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
|
12
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
|
|
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
|
+
|
|
13
194
|
## License
|
|
14
195
|
|
|
15
196
|
MIT
|
|
16
197
|
|
|
198
|
+
See the [license](LICENSE) file for more details.
|
|
199
|
+
|
|
17
200
|
---
|
|
18
201
|
|
|
19
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":[]}
|
|
@@ -3,127 +3,23 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// For each file, get the filename without extension
|
|
26
|
-
const filesWithoutExt = files.map(file => (0, _path.parse)(file.name).name);
|
|
27
|
-
return filesWithoutExt;
|
|
28
|
-
}
|
|
29
|
-
function isInsideModule(filename, module) {
|
|
30
|
-
const normalized = (0, _path.normalize)(filename);
|
|
31
|
-
|
|
32
|
-
// Match exact module name
|
|
33
|
-
if (normalized === module) {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Absolute posix paths
|
|
38
|
-
if (normalized.startsWith(`${module}/`)) {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Check for our local development structure
|
|
43
|
-
if (normalized.includes(`${_path.sep}${module}${_path.sep}src${_path.sep}`)) {
|
|
44
|
-
// Ignore the test files
|
|
45
|
-
return !normalized.includes("__tests__");
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Match classic node_modules
|
|
49
|
-
if (normalized.includes(`${_path.sep}node_modules${_path.sep}${module}${_path.sep}`)) {
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Match Yarn PnP .zip-style paths (e.g., .zip/node_modules/${module}/)
|
|
54
|
-
if (normalized.includes(`${_path.sep}.zip${_path.sep}node_modules${_path.sep}${module}${_path.sep}`)) {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Match Yarn .yarn/cache/${module}/*
|
|
59
|
-
if (normalized.includes(`${_path.sep}.yarn${_path.sep}cache${_path.sep}${module}${_path.sep}`)) {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
function isPackageImport(path) {
|
|
65
|
-
const source = path.node.source?.value;
|
|
66
|
-
if (!source) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
return source === "react-native" || source === "react-native-web";
|
|
70
|
-
}
|
|
71
|
-
function shouldTransformImport(path, filename) {
|
|
72
|
-
let source = path.node.source?.value;
|
|
73
|
-
if (!source) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
if (source.startsWith(".")) {
|
|
77
|
-
source = (0, _path.resolve)((0, _path.dirname)(filename), source);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
81
|
-
return isReactNativeSource(source) || isReactNativeWebSource(source);
|
|
82
|
-
}
|
|
83
|
-
function isReactNativeSource(source) {
|
|
84
|
-
if (source === "react-native") return true;
|
|
85
|
-
const components = source.split(`react-native${_path.sep}Libraries${_path.sep}Components${_path.sep}`);
|
|
86
|
-
if (components.length > 1) {
|
|
87
|
-
const component = components[1]?.split(_path.sep)[0];
|
|
88
|
-
return component && allowedModules.has(component);
|
|
89
|
-
}
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
function isReactNativeWebSource(source) {
|
|
93
|
-
if (source === "react-native-web") return true;
|
|
94
|
-
let components = source.split(`react-native-web${_path.sep}dist${_path.sep}commonjs${_path.sep}exports${_path.sep}`);
|
|
95
|
-
if (components.length > 1) {
|
|
96
|
-
const component = components[1]?.split(_path.sep)[0];
|
|
97
|
-
return component && allowedModules.has(component);
|
|
98
|
-
}
|
|
99
|
-
components = source.split(`react-native-web${_path.sep}dist${_path.sep}module${_path.sep}exports${_path.sep}`);
|
|
100
|
-
if (components.length > 1) {
|
|
101
|
-
const component = components[1]?.split(_path.sep)[0];
|
|
102
|
-
return component && allowedModules.has(component);
|
|
103
|
-
}
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
function shouldTransformRequire(t, node, basePath) {
|
|
107
|
-
const {
|
|
108
|
-
declarations
|
|
109
|
-
} = node;
|
|
110
|
-
const declaration = declarations[0];
|
|
111
|
-
if (declarations.length > 1 || !declaration) {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
const {
|
|
115
|
-
id,
|
|
116
|
-
init
|
|
117
|
-
} = declaration;
|
|
118
|
-
let source = (t.isObjectPattern(id) || t.isIdentifier(id)) && t.isCallExpression(init) && t.isIdentifier(init.callee) && init.callee.name === "require" && init.arguments.length === 1 && "value" in init.arguments[0] && typeof init.arguments[0].value === "string" && init.arguments[0].value;
|
|
119
|
-
if (!source) {
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
if (source.startsWith(".")) {
|
|
123
|
-
source = (0, _path.resolve)(basePath, source);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
127
|
-
return isReactNativeSource(source) || isReactNativeWebSource(source);
|
|
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;
|
|
128
24
|
}
|
|
129
25
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
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":[]}
|
|
@@ -4,92 +4,96 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = _default;
|
|
7
|
+
var _path = require("path");
|
|
7
8
|
var _helpers = require("./helpers.js");
|
|
9
|
+
var _reactNative = require("./react-native.js");
|
|
10
|
+
var _reactNativeWeb = require("./react-native-web.js");
|
|
8
11
|
function _default({
|
|
9
12
|
types: t
|
|
10
13
|
}) {
|
|
11
14
|
const processed = new WeakSet();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return
|
|
16
|
-
}
|
|
17
|
-
function requireDeclaration(...args) {
|
|
18
|
-
const declaration = t.variableDeclaration(...args);
|
|
19
|
-
processed.add(declaration);
|
|
20
|
-
return declaration;
|
|
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);
|
|
21
19
|
}
|
|
22
20
|
return {
|
|
23
21
|
name: "Rewrite react-native to react-native-css",
|
|
24
22
|
visitor: {
|
|
25
23
|
ImportDeclaration(path, state) {
|
|
26
|
-
if (processed.has(path) || processed.has(path.node)) {
|
|
24
|
+
if (processed.has(path) || processed.has(path.node) || isFromThisModule(state.filename)) {
|
|
27
25
|
return;
|
|
28
26
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
source
|
|
32
|
-
} = path.node;
|
|
33
|
-
if ((0, _helpers.isInsideModule)(state.filename, "react-native-css") || !(0, _helpers.shouldTransformImport)(path, state.filename)) {
|
|
27
|
+
const statements = (0, _reactNative.handleReactNativeImport)(path.node, t, state.filename) ?? (0, _reactNativeWeb.handleReactNativeWebImport)(path.node, t, state.filename);
|
|
28
|
+
if (!statements) {
|
|
34
29
|
return;
|
|
35
30
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
path.scope.registerDeclaration(path);
|
|
39
|
-
return;
|
|
31
|
+
for (const statement of statements) {
|
|
32
|
+
processed.add(statement);
|
|
40
33
|
}
|
|
41
|
-
|
|
42
|
-
if (t.isImportDefaultSpecifier(specifier)) {
|
|
43
|
-
const name = specifier.local.name;
|
|
44
|
-
if ((0, _helpers.isPackageImport)(path)) {
|
|
45
|
-
return importDeclaration([t.importDefaultSpecifier(specifier.local)], t.stringLiteral("react-native-css/components"));
|
|
46
|
-
} else if (_helpers.allowedModules.has(name)) {
|
|
47
|
-
return importDeclaration([t.importSpecifier(specifier.local, specifier.local)], t.stringLiteral(`react-native-css/components/${name}`));
|
|
48
|
-
} else {
|
|
49
|
-
return importDeclaration([specifier], source);
|
|
50
|
-
}
|
|
51
|
-
} else if (t.isImportNamespaceSpecifier(specifier)) {
|
|
52
|
-
return importDeclaration([specifier], t.stringLiteral("react-native-css/components"));
|
|
53
|
-
} else {
|
|
54
|
-
const localName = t.isStringLiteral(specifier.imported) ? specifier.imported.value : specifier.imported.name;
|
|
55
|
-
return _helpers.allowedModules.has(localName) ? importDeclaration([t.importSpecifier(specifier.local, specifier.imported)], t.stringLiteral(`react-native-css/components/${localName}`)) : importDeclaration([specifier], source);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
path.replaceInline(imports).map(importPath => {
|
|
59
|
-
path.scope.registerDeclaration(importPath);
|
|
60
|
-
});
|
|
34
|
+
path.replaceWithMultiple(statements);
|
|
61
35
|
},
|
|
62
36
|
VariableDeclaration(path, state) {
|
|
63
|
-
if (processed.has(path) || processed.has(path.node)) {
|
|
37
|
+
if (processed.has(path) || processed.has(path.node) || isFromThisModule(state.filename)) {
|
|
64
38
|
return;
|
|
65
39
|
}
|
|
66
|
-
|
|
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) {
|
|
67
44
|
return;
|
|
68
45
|
}
|
|
69
46
|
|
|
70
|
-
//
|
|
47
|
+
// Skip declarations that are not initialized. eg `let x;`
|
|
48
|
+
if (!firstDeclaration?.init) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
71
51
|
const {
|
|
72
52
|
id,
|
|
73
53
|
init
|
|
74
|
-
} =
|
|
75
|
-
|
|
76
|
-
|
|
54
|
+
} = firstDeclaration;
|
|
55
|
+
|
|
56
|
+
// We only handle `const <id> = <init>()`
|
|
57
|
+
if (!t.isCallExpression(init)) {
|
|
77
58
|
return;
|
|
78
59
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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;
|
|
89
87
|
}
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
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);
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
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":"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","ignoreList":[]}
|