react-native-css 2.1.2 → 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 -47
- 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 -17
- package/.editorconfig +0 -17
- package/.eslintignore +0 -3
- package/.eslintrc +0 -39
- package/.npmignore +0 -7
- package/build/index.js +0 -299
- package/build/utils.js +0 -61
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TextInput","RNTextInput","useCssElement","mapping","className","props"],"sourceRoot":"../../../src","sources":["components/TextInput.tsx"],"mappings":";;AAAA,SAASA,SAAS,IAAIC,WAAW,QAA6B,cAAc;AAE5E,SACEC,aAAa,QAGR,qBAAY;AAEnB,MAAMC,OAAO,GAAG;EACdC,SAAS,EAAE;AACb,CAAmD;AAEnD,OAAO,SAASJ,SAASA,CAACK,KAAkD,EAAE;EAC5E,OAAOH,aAAa,CAACD,WAAW,EAAEI,KAAK,EAAEF,OAAO,CAAC;AACnD;AAEA,eAAeH,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View as RNView } from "react-native";
|
|
4
|
+
import { useCssElement } from "../runtime/index.js";
|
|
5
|
+
const mapping = {
|
|
6
|
+
className: "style"
|
|
7
|
+
};
|
|
8
|
+
export function View(props) {
|
|
9
|
+
return useCssElement(RNView, props, mapping);
|
|
10
|
+
}
|
|
11
|
+
export default View;
|
|
12
|
+
//# sourceMappingURL=View.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","RNView","useCssElement","mapping","className","props"],"sourceRoot":"../../../src","sources":["components/View.tsx"],"mappings":";;AAAA,SAASA,IAAI,IAAIC,MAAM,QAAwB,cAAc;AAE7D,SACEC,aAAa,QAGR,qBAAY;AAEnB,MAAMC,OAAO,GAAG;EACdC,SAAS,EAAE;AACb,CAA8C;AAE9C,OAAO,SAASJ,IAAIA,CAACK,KAA6C,EAAE;EAClE,OAAOH,aAAa,CAACD,MAAM,EAAEI,KAAK,EAAEF,OAAO,CAAC;AAC9C;AAEA,eAAeH,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export * from "react-native";
|
|
4
|
+
export { ActivityIndicator } from "./ActivityIndicator.js";
|
|
5
|
+
export { Button } from "./Button.js";
|
|
6
|
+
export { FlatList } from "./FlatList.js";
|
|
7
|
+
export { Image } from "./Image.js";
|
|
8
|
+
export { Switch } from "./Switch.js";
|
|
9
|
+
export { Text } from "./Text.js";
|
|
10
|
+
export { TextInput } from "./TextInput.js";
|
|
11
|
+
export { View } from "./View.js";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ActivityIndicator","Button","FlatList","Image","Switch","Text","TextInput","View"],"sourceRoot":"../../../src","sources":["components/index.tsx"],"mappings":";;AAAA,cAAc,cAAc;AAE5B,SAASA,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,QAAQ,QAAQ,eAAY;AACrC,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,IAAI,QAAQ,WAAQ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["doctor/index.ts"],"mappings":";;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,oBAAW;AAEzB,cAAc,kBAAe","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["jest/expect.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Appearance, Dimensions } from "react-native";
|
|
4
|
+
import { inspect } from "node:util";
|
|
5
|
+
import { compile } from "../compiler/index.js";
|
|
6
|
+
import { StyleCollection } from "../runtime/native/injection.js";
|
|
7
|
+
import { colorScheme, dimensions, rem } from "../runtime/native/reactivity.js";
|
|
8
|
+
export const testID = "react-native-css";
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
StyleCollection.styles.clear();
|
|
11
|
+
dimensions.set(Dimensions.get("window"));
|
|
12
|
+
rem.set(14);
|
|
13
|
+
Appearance.setColorScheme(null);
|
|
14
|
+
colorScheme.set(null);
|
|
15
|
+
});
|
|
16
|
+
const debugDefault = Boolean(process.env.REACT_NATIVE_CSS_TEST_DEBUG && process.env.NODE_OPTIONS?.includes("--inspect"));
|
|
17
|
+
export function registerCSS(css, options = {}) {
|
|
18
|
+
const {
|
|
19
|
+
debug = debugDefault
|
|
20
|
+
} = options;
|
|
21
|
+
const compiled = compileWithAutoDebug(css, options);
|
|
22
|
+
if (debug) {
|
|
23
|
+
console.log(`Compiled:\n---\n${inspect({
|
|
24
|
+
stylesheet: compiled.stylesheet(),
|
|
25
|
+
warnings: compiled.warnings()
|
|
26
|
+
}, {
|
|
27
|
+
depth: null,
|
|
28
|
+
colors: true,
|
|
29
|
+
compact: false
|
|
30
|
+
})}`);
|
|
31
|
+
}
|
|
32
|
+
StyleCollection.inject(compiled.stylesheet());
|
|
33
|
+
return compiled;
|
|
34
|
+
}
|
|
35
|
+
export function compileWithAutoDebug(css, {
|
|
36
|
+
debug = debugDefault,
|
|
37
|
+
...options
|
|
38
|
+
} = {}) {
|
|
39
|
+
const logger = debug ? text => {
|
|
40
|
+
// Just log the rules
|
|
41
|
+
if (text.startsWith("[")) {
|
|
42
|
+
console.log(`Rules:\n---\n${text}`);
|
|
43
|
+
}
|
|
44
|
+
} : undefined;
|
|
45
|
+
return compile(css, {
|
|
46
|
+
...options,
|
|
47
|
+
logger
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Appearance","Dimensions","inspect","compile","StyleCollection","colorScheme","dimensions","rem","testID","beforeEach","styles","clear","set","get","setColorScheme","debugDefault","Boolean","process","env","REACT_NATIVE_CSS_TEST_DEBUG","NODE_OPTIONS","includes","registerCSS","css","options","debug","compiled","compileWithAutoDebug","console","log","stylesheet","warnings","depth","colors","compact","inject","logger","text","startsWith","undefined"],"sourceRoot":"../../../src","sources":["jest/index.ts"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAErD,SAASC,OAAO,QAAQ,WAAW;AAEnC,SAASC,OAAO,QAA8B,sBAAa;AAC3D,SAASC,eAAe,QAAQ,gCAA6B;AAC7D,SAASC,WAAW,EAAEC,UAAU,EAAEC,GAAG,QAAQ,iCAA8B;AAW3E,OAAO,MAAMC,MAAM,GAAG,kBAAkB;AAExCC,UAAU,CAAC,MAAM;EACfL,eAAe,CAACM,MAAM,CAACC,KAAK,CAAC,CAAC;EAC9BL,UAAU,CAACM,GAAG,CAACX,UAAU,CAACY,GAAG,CAAC,QAAQ,CAAC,CAAC;EACxCN,GAAG,CAACK,GAAG,CAAC,EAAE,CAAC;EACXZ,UAAU,CAACc,cAAc,CAAC,IAAI,CAAC;EAC/BT,WAAW,CAACO,GAAG,CAAC,IAAI,CAAC;AACvB,CAAC,CAAC;AAEF,MAAMG,YAAY,GAAGC,OAAO,CAC1BC,OAAO,CAACC,GAAG,CAACC,2BAA2B,IACrCF,OAAO,CAACC,GAAG,CAACE,YAAY,EAAEC,QAAQ,CAAC,WAAW,CAClD,CAAC;AAED,OAAO,SAASC,WAAWA,CACzBC,GAAW,EACXC,OAA8C,GAAG,CAAC,CAAC,EACnD;EACA,MAAM;IAAEC,KAAK,GAAGV;EAAa,CAAC,GAAGS,OAAO;EACxC,MAAME,QAAQ,GAAGC,oBAAoB,CAACJ,GAAG,EAAEC,OAAO,CAAC;EAEnD,IAAIC,KAAK,EAAE;IACTG,OAAO,CAACC,GAAG,CACT,mBAAmB3B,OAAO,CACxB;MACE4B,UAAU,EAAEJ,QAAQ,CAACI,UAAU,CAAC,CAAC;MACjCC,QAAQ,EAAEL,QAAQ,CAACK,QAAQ,CAAC;IAC9B,CAAC,EACD;MAAEC,KAAK,EAAE,IAAI;MAAEC,MAAM,EAAE,IAAI;MAAEC,OAAO,EAAE;IAAM,CAC9C,CAAC,EACH,CAAC;EACH;EAEA9B,eAAe,CAAC+B,MAAM,CAACT,QAAQ,CAACI,UAAU,CAAC,CAAC,CAAC;EAE7C,OAAOJ,QAAQ;AACjB;AAEA,OAAO,SAASC,oBAAoBA,CAClCJ,GAAW,EACX;EACEE,KAAK,GAAGV,YAAY;EACpB,GAAGS;AACkC,CAAC,GAAG,CAAC,CAAC,EAC7C;EACA,MAAMY,MAAM,GAAGX,KAAK,GACfY,IAAY,IAAK;IAChB;IACA,IAAIA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,EAAE;MACxBV,OAAO,CAACC,GAAG,CAAC,gBAAgBQ,IAAI,EAAE,CAAC;IACrC;EACF,CAAC,GACDE,SAAS;EAEb,OAAOpC,OAAO,CAACoB,GAAG,EAAE;IAAE,GAAGC,OAAO;IAAEY;EAAO,CAAC,CAAC;AAC7C","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["jest/setup.ts"],"mappings":"AAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// import matchers from "expect/build/matchers";
|
|
2
|
+
|
|
3
|
+
// // I do not know why this is needed
|
|
4
|
+
// matchers.customTesters = [];
|
|
5
|
+
|
|
6
|
+
// expect.extend({
|
|
7
|
+
// toHaveStyle(received, style) {
|
|
8
|
+
// const receivedStyle = received?.props?.style
|
|
9
|
+
// ? Object.fromEntries(Object.entries(received?.props?.style))
|
|
10
|
+
// : undefined;
|
|
11
|
+
// return matchers.toStrictEqual(receivedStyle, style);
|
|
12
|
+
// },
|
|
13
|
+
// });
|
|
14
|
+
"use strict";
|
|
15
|
+
//# sourceMappingURL=setupAfterEnv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["jest/setupAfterEnv.ts"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { dirname, relative, sep } from "node:path";
|
|
5
|
+
import { versions } from "node:process";
|
|
6
|
+
import connect from "connect";
|
|
7
|
+
import debug from "debug";
|
|
8
|
+
import { compile } from "../compiler/compiler.js";
|
|
9
|
+
import { getNativeInjectionCode, getWebInjectionCode } from "./injection-code.js";
|
|
10
|
+
import { nativeResolver, webResolver } from "./resolver.js";
|
|
11
|
+
import { setupTypeScript } from "./typescript.js";
|
|
12
|
+
const defaultLogger = debug("react-native-css:metro");
|
|
13
|
+
export function withReactNativeCSS(config, options) {
|
|
14
|
+
if (typeof config === "function") {
|
|
15
|
+
return async () => {
|
|
16
|
+
return withReactNativeCSS(await config(), options);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (Number(versions.node.split(".")[0]) < 20) {
|
|
20
|
+
throw new Error("react-native-css only supports NodeJS >20");
|
|
21
|
+
}
|
|
22
|
+
const {
|
|
23
|
+
disableTypeScriptGeneration,
|
|
24
|
+
typescriptEnvPath,
|
|
25
|
+
globalClassNamePolyfill = false,
|
|
26
|
+
logger = defaultLogger
|
|
27
|
+
} = options || {};
|
|
28
|
+
const loggerEnabled = "enabled" in logger ? logger.enabled : true;
|
|
29
|
+
if (disableTypeScriptGeneration !== true) {
|
|
30
|
+
setupTypeScript(typescriptEnvPath);
|
|
31
|
+
}
|
|
32
|
+
const originalMiddleware = config.server?.enhanceMiddleware;
|
|
33
|
+
const originalResolver = config.resolver?.resolveRequest;
|
|
34
|
+
const poisonPillPath = "./poison.pill";
|
|
35
|
+
return {
|
|
36
|
+
...config,
|
|
37
|
+
transformerPath: require.resolve("./metro-transformer"),
|
|
38
|
+
resolver: {
|
|
39
|
+
...config.resolver,
|
|
40
|
+
sourceExts: [...(config?.resolver?.sourceExts || []), "css"],
|
|
41
|
+
resolveRequest: (context, moduleName, platform) => {
|
|
42
|
+
if (moduleName === poisonPillPath) {
|
|
43
|
+
return {
|
|
44
|
+
type: "empty"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Don't hijack the resolution of react-native imports
|
|
49
|
+
if (!globalClassNamePolyfill) {
|
|
50
|
+
const parentResolver = originalResolver ?? context.resolveRequest;
|
|
51
|
+
return parentResolver(context, moduleName, platform);
|
|
52
|
+
}
|
|
53
|
+
const parentResolver = originalResolver ?? context.resolveRequest;
|
|
54
|
+
const resolver = platform === "web" ? webResolver : nativeResolver;
|
|
55
|
+
const resolved = resolver(parentResolver, context, moduleName, platform);
|
|
56
|
+
return resolved;
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
server: {
|
|
60
|
+
...config.server,
|
|
61
|
+
enhanceMiddleware(middleware, metroServer) {
|
|
62
|
+
const server = connect();
|
|
63
|
+
const bundler = metroServer.getBundler().getBundler();
|
|
64
|
+
if (!bundler.__react_native_css__patched) {
|
|
65
|
+
bundler.__react_native_css__patched = true;
|
|
66
|
+
const nativeCSSFiles = new Map();
|
|
67
|
+
const webCSSFiles = new Set();
|
|
68
|
+
const nativeInjectionPath = require.resolve("../runtime/native/metro");
|
|
69
|
+
const nativeInjectionFilepaths = [
|
|
70
|
+
// CommonJS
|
|
71
|
+
nativeInjectionPath,
|
|
72
|
+
// ES Module
|
|
73
|
+
nativeInjectionPath.replace(`dist${sep}commonjs`, `dist${sep}module`),
|
|
74
|
+
// TypeScript
|
|
75
|
+
nativeInjectionPath.replace(`dist${sep}commonjs`, `src`).replace(".js", ".ts")];
|
|
76
|
+
const webInjectionPath = require.resolve("../runtime/web/metro");
|
|
77
|
+
const webInjectionFilepaths = [
|
|
78
|
+
// CommonJS
|
|
79
|
+
webInjectionPath,
|
|
80
|
+
// ES Module
|
|
81
|
+
webInjectionPath.replace(`dist${sep}commonjs`, `dist${sep}module`),
|
|
82
|
+
// TypeScript
|
|
83
|
+
webInjectionPath.replace(`dist${sep}commonjs`, `src`).replace(".js", ".ts")];
|
|
84
|
+
|
|
85
|
+
// Keep the original
|
|
86
|
+
const transformFile = bundler.transformFile.bind(bundler);
|
|
87
|
+
const watcher = bundler.getWatcher();
|
|
88
|
+
|
|
89
|
+
// Patch with our functionality
|
|
90
|
+
bundler.transformFile = async function (filePath, transformOptions, fileBuffer) {
|
|
91
|
+
const isCss = /\.(s?css|sass)$/.test(filePath);
|
|
92
|
+
if (transformOptions.platform === "web") {
|
|
93
|
+
if (isCss) {
|
|
94
|
+
webCSSFiles.add(filePath);
|
|
95
|
+
} else if (webInjectionFilepaths.includes(filePath)) {
|
|
96
|
+
fileBuffer = getWebInjectionCode(Array.from(webCSSFiles));
|
|
97
|
+
}
|
|
98
|
+
return transformFile(filePath, transformOptions, fileBuffer);
|
|
99
|
+
} else {
|
|
100
|
+
// Handle CSS files on native platforms
|
|
101
|
+
if (isCss) {
|
|
102
|
+
const webTransform = await transformFile(filePath, {
|
|
103
|
+
...transformOptions,
|
|
104
|
+
// Force the platform to web for CSS files
|
|
105
|
+
platform: "web",
|
|
106
|
+
// Let the transformer know that we will handle compilation
|
|
107
|
+
customTransformOptions: {
|
|
108
|
+
...transformOptions.customTransformOptions,
|
|
109
|
+
reactNativeCSSCompile: false
|
|
110
|
+
}
|
|
111
|
+
}, fileBuffer);
|
|
112
|
+
const lastTransform = nativeCSSFiles.get(filePath);
|
|
113
|
+
const last = lastTransform?.[0];
|
|
114
|
+
const next = webTransform.output[0].data.css.code.toString();
|
|
115
|
+
|
|
116
|
+
// The CSS file has changed, we need to recompile the injection file
|
|
117
|
+
if (next !== last) {
|
|
118
|
+
nativeCSSFiles.set(filePath, [next, compile(next, {
|
|
119
|
+
hexColors: options?.hexColors
|
|
120
|
+
}).stylesheet()]);
|
|
121
|
+
watcher.emit("change", {
|
|
122
|
+
eventsQueue: nativeInjectionFilepaths.map(filePath => ({
|
|
123
|
+
filePath,
|
|
124
|
+
metadata: {
|
|
125
|
+
modifiedTime: Date.now(),
|
|
126
|
+
size: 1,
|
|
127
|
+
// Can be anything
|
|
128
|
+
type: "virtual" // Can be anything
|
|
129
|
+
},
|
|
130
|
+
type: "change"
|
|
131
|
+
}))
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
const nativeTransform = await transformFile(filePath, transformOptions, fileBuffer);
|
|
135
|
+
|
|
136
|
+
// Tell Expo to skip caching this file
|
|
137
|
+
nativeTransform.output[0].data.css = {
|
|
138
|
+
skipCache: true,
|
|
139
|
+
// Expo requires a `code` property
|
|
140
|
+
code: ""
|
|
141
|
+
};
|
|
142
|
+
return nativeTransform;
|
|
143
|
+
} else if (nativeInjectionFilepaths.includes(filePath)) {
|
|
144
|
+
// If this is the injection file, we to swap its content with the
|
|
145
|
+
// compiled CSS files
|
|
146
|
+
fileBuffer = getNativeInjectionCode(Array.from(nativeCSSFiles.keys()).map(key => relative(dirname(filePath), key)), Array.from(nativeCSSFiles.values()).map(([, value]) => value));
|
|
147
|
+
if (loggerEnabled && fileBuffer) {
|
|
148
|
+
logger(`Transformed ${filePath}`);
|
|
149
|
+
logger(fileBuffer?.toString());
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return transformFile(filePath, transformOptions, fileBuffer);
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
return originalMiddleware ? server.use(originalMiddleware(middleware, metroServer)) : server.use(middleware);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dirname","relative","sep","versions","connect","debug","compile","getNativeInjectionCode","getWebInjectionCode","nativeResolver","webResolver","setupTypeScript","defaultLogger","withReactNativeCSS","config","options","Number","node","split","Error","disableTypeScriptGeneration","typescriptEnvPath","globalClassNamePolyfill","logger","loggerEnabled","enabled","originalMiddleware","server","enhanceMiddleware","originalResolver","resolver","resolveRequest","poisonPillPath","transformerPath","require","resolve","sourceExts","context","moduleName","platform","type","parentResolver","resolved","middleware","metroServer","bundler","getBundler","__react_native_css__patched","nativeCSSFiles","Map","webCSSFiles","Set","nativeInjectionPath","nativeInjectionFilepaths","replace","webInjectionPath","webInjectionFilepaths","transformFile","bind","watcher","getWatcher","filePath","transformOptions","fileBuffer","isCss","test","add","includes","Array","from","webTransform","customTransformOptions","reactNativeCSSCompile","lastTransform","get","last","next","output","data","css","code","toString","set","hexColors","stylesheet","emit","eventsQueue","map","metadata","modifiedTime","Date","now","size","nativeTransform","skipCache","keys","key","values","value","use"],"sourceRoot":"../../../src","sources":["metro/index.ts"],"mappings":";;AAAA;AACA,SAASA,OAAO,EAAEC,QAAQ,EAAEC,GAAG,QAAQ,WAAW;AAClD,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,OAAO,MAAM,SAAS;AAC7B,OAAOC,KAAK,MAAM,OAAO;AAIzB,SAASC,OAAO,QAAQ,yBAAsB;AAC9C,SAASC,sBAAsB,EAAEC,mBAAmB,QAAQ,qBAAkB;AAC9E,SAASC,cAAc,EAAEC,WAAW,QAAQ,eAAY;AACxD,SAASC,eAAe,QAAQ,iBAAc;AAY9C,MAAMC,aAAa,GAAGP,KAAK,CAAC,wBAAwB,CAAC;AAErD,OAAO,SAASQ,kBAAkBA,CAEhCC,MAAS,EAAEC,OAAmC,EAAK;EACnD,IAAI,OAAOD,MAAM,KAAK,UAAU,EAAE;IAChC,OAAQ,YAAY;MAClB,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,EAAEmC,GAAG,CACjC,CAAC,EACD5B,KAAK,CAACC,IAAI,CAACrB,cAAc,CAACiD,MAAM,CAAC,CAAC,CAAC,CAACV,GAAG,CAAC,CAAC,GAAGW,KAAK,CAAC,KAAKA,KAAK,CAC9D,CAAC;gBAED,IAAI1E,aAAa,IAAIuC,UAAU,EAAE;kBAC/BxC,MAAM,CAAC,eAAesC,QAAQ,EAAE,CAAC;kBACjCtC,MAAM,CAACwC,UAAU,EAAEkB,QAAQ,CAAC,CAAC,CAAC;gBAChC;cACF;cAEA,OAAOxB,aAAa,CAACI,QAAQ,EAAEC,gBAAgB,EAAEC,UAAU,CAAC;YAC9D;UACF,CAAC;QACH;QAEA,OAAOrC,kBAAkB,GACrBC,MAAM,CAACwE,GAAG,CAACzE,kBAAkB,CAACiB,UAAU,EAAEC,WAAW,CAAC,CAAC,GACvDjB,MAAM,CAACwE,GAAG,CAACxD,UAAU,CAAC;MAC5B;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This is a hack around Expo's handling of CSS files.
|
|
5
|
+
* When a component is inside a lazy() barrier, it is inside a different JS bundle.
|
|
6
|
+
* So when it updates, it only updates its local bundle, not the global one which contains the CSS files.
|
|
7
|
+
*
|
|
8
|
+
* To fix this, we force our code to always import the CSS files.
|
|
9
|
+
* Now the CSS files are in every bundle.
|
|
10
|
+
*
|
|
11
|
+
* We achieve this by collecting all CSS files and injecting them into a special file
|
|
12
|
+
* which is included inside react-native-css's runtime.
|
|
13
|
+
*
|
|
14
|
+
* This is why both of these function add imports for the CSS files.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export function getWebInjectionCode(filePaths) {
|
|
18
|
+
const importStatements = filePaths.map(filePath => `import "${filePath}";`).join("\n");
|
|
19
|
+
return Buffer.from(importStatements);
|
|
20
|
+
}
|
|
21
|
+
export function getNativeInjectionCode(cssFilePaths, values) {
|
|
22
|
+
const importStatements = cssFilePaths.map(filePath => `import "${filePath}";`).join("\n");
|
|
23
|
+
const importPath = `import { StyleCollection } from "./api";`;
|
|
24
|
+
const contents = values.map(value => `StyleCollection.inject(${JSON.stringify(value)});`).join("\n");
|
|
25
|
+
return Buffer.from(`${importStatements}\n${importPath}\n${contents};export {};`);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=injection-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getWebInjectionCode","filePaths","importStatements","map","filePath","join","Buffer","from","getNativeInjectionCode","cssFilePaths","values","importPath","contents","value","JSON","stringify"],"sourceRoot":"../../../src","sources":["metro/injection-code.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,mBAAmBA,CAACC,SAAmB,EAAE;EACvD,MAAMC,gBAAgB,GAAGD,SAAS,CAC/BE,GAAG,CAAEC,QAAQ,IAAK,WAAWA,QAAQ,IAAI,CAAC,CAC1CC,IAAI,CAAC,IAAI,CAAC;EAEb,OAAOC,MAAM,CAACC,IAAI,CAACL,gBAAgB,CAAC;AACtC;AAEA,OAAO,SAASM,sBAAsBA,CACpCC,YAAsB,EACtBC,MAAiB,EACjB;EACA,MAAMR,gBAAgB,GAAGO,YAAY,CAClCN,GAAG,CAAEC,QAAQ,IAAK,WAAWA,QAAQ,IAAI,CAAC,CAC1CC,IAAI,CAAC,IAAI,CAAC;EACb,MAAMM,UAAU,GAAG,0CAA0C;EAC7D,MAAMC,QAAQ,GAAGF,MAAM,CACpBP,GAAG,CAAEU,KAAK,IAAK,0BAA0BC,IAAI,CAACC,SAAS,CAACF,KAAK,CAAC,IAAI,CAAC,CACnER,IAAI,CAAC,IAAI,CAAC;EAEb,OAAOC,MAAM,CAACC,IAAI,CAChB,GAAGL,gBAAgB,KAAKS,UAAU,KAAKC,QAAQ,aACjD,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const worker =
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
5
|
+
require("@expo/metro-config/build/transform-worker/transform-worker.js");
|
|
6
|
+
export function transform(config, projectRoot, filePath, data, options) {
|
|
7
|
+
const isCss = options.type !== "asset" && /\.(s?css|sass)$/.test(filePath);
|
|
8
|
+
const skipCompile = options.customTransformOptions && "reactNativeCSSCompile" in options.customTransformOptions && options.customTransformOptions.reactNativeCSSCompile === false;
|
|
9
|
+
if (!isCss || skipCompile) {
|
|
10
|
+
return worker.transform(config, projectRoot, filePath, data, options);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// TODO - compile the CSS file inline
|
|
14
|
+
|
|
15
|
+
return worker.transform(config, projectRoot, filePath, data, options);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=metro-transformer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["worker","require","transform","config","projectRoot","filePath","data","options","isCss","type","test","skipCompile","customTransformOptions","reactNativeCSSCompile"],"sourceRoot":"../../../src","sources":["metro/metro-transformer.ts"],"mappings":";;AAMA,MAAMA,MAAM;AACV;AACAC,OAAO,CAAC,+DAA+D,CAA4C;AAErH,OAAO,SAASC,SAASA,CACvBC,MAA2B,EAC3BC,WAAmB,EACnBC,QAAgB,EAChBC,IAAY,EACZC,OAA2B,EACC;EAC5B,MAAMC,KAAK,GAAGD,OAAO,CAACE,IAAI,KAAK,OAAO,IAAI,iBAAiB,CAACC,IAAI,CAACL,QAAQ,CAAC;EAC1E,MAAMM,WAAW,GACfJ,OAAO,CAACK,sBAAsB,IAC9B,uBAAuB,IAAIL,OAAO,CAACK,sBAAsB,IACzDL,OAAO,CAACK,sBAAsB,CAACC,qBAAqB,KAAK,KAAK;EAEhE,IAAI,CAACL,KAAK,IAAIG,WAAW,EAAE;IACzB,OAAOX,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,CAAC;EACvE;;EAEA;;EAEA,OAAOP,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,CAAC;AACvE","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// ISC License
|
|
5
|
+
|
|
6
|
+
// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
|
|
7
|
+
|
|
8
|
+
// Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
+
// purpose with or without fee is hereby granted, provided that the above
|
|
10
|
+
// copyright notice and this permission notice appear in all copies.
|
|
11
|
+
|
|
12
|
+
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
13
|
+
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
14
|
+
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
15
|
+
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
16
|
+
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
17
|
+
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
18
|
+
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
19
|
+
//
|
|
20
|
+
// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
env,
|
|
24
|
+
stdout
|
|
25
|
+
} = globalThis?.process ?? {};
|
|
26
|
+
const enabled = env && !env.NO_COLOR && (env.FORCE_COLOR || stdout?.isTTY && !env.CI && env.TERM !== "dumb");
|
|
27
|
+
const replaceClose = (str, close, replace, index) => {
|
|
28
|
+
const start = str.substring(0, index) + replace;
|
|
29
|
+
const end = str.substring(index + close.length);
|
|
30
|
+
const nextIndex = end.indexOf(close);
|
|
31
|
+
return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
|
|
32
|
+
};
|
|
33
|
+
const formatter = (open, close, replace = open) => {
|
|
34
|
+
if (!enabled) return String;
|
|
35
|
+
return input => {
|
|
36
|
+
const string = "" + input;
|
|
37
|
+
const index = string.indexOf(close, open.length);
|
|
38
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export const reset = enabled ? s => `\x1b[0m${s}\x1b[0m` : String;
|
|
42
|
+
export const bold = formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m");
|
|
43
|
+
export const dim = formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m");
|
|
44
|
+
export const italic = formatter("\x1b[3m", "\x1b[23m");
|
|
45
|
+
export const underline = formatter("\x1b[4m", "\x1b[24m");
|
|
46
|
+
export const inverse = formatter("\x1b[7m", "\x1b[27m");
|
|
47
|
+
export const hidden = formatter("\x1b[8m", "\x1b[28m");
|
|
48
|
+
export const strikethrough = formatter("\x1b[9m", "\x1b[29m");
|
|
49
|
+
export const black = formatter("\x1b[30m", "\x1b[39m");
|
|
50
|
+
export const red = formatter("\x1b[31m", "\x1b[39m");
|
|
51
|
+
export const green = formatter("\x1b[32m", "\x1b[39m");
|
|
52
|
+
export const yellow = formatter("\x1b[33m", "\x1b[39m");
|
|
53
|
+
export const blue = formatter("\x1b[34m", "\x1b[39m");
|
|
54
|
+
export const magenta = formatter("\x1b[35m", "\x1b[39m");
|
|
55
|
+
export const purple = formatter("\x1b[38;2;173;127;168m", "\x1b[39m");
|
|
56
|
+
export const cyan = formatter("\x1b[36m", "\x1b[39m");
|
|
57
|
+
export const white = formatter("\x1b[37m", "\x1b[39m");
|
|
58
|
+
export const gray = formatter("\x1b[90m", "\x1b[39m");
|
|
59
|
+
export const bgBlack = formatter("\x1b[40m", "\x1b[49m");
|
|
60
|
+
export const bgRed = formatter("\x1b[41m", "\x1b[49m");
|
|
61
|
+
export const bgGreen = formatter("\x1b[42m", "\x1b[49m");
|
|
62
|
+
export const bgYellow = formatter("\x1b[43m", "\x1b[49m");
|
|
63
|
+
export const bgBlue = formatter("\x1b[44m", "\x1b[49m");
|
|
64
|
+
export const bgMagenta = formatter("\x1b[45m", "\x1b[49m");
|
|
65
|
+
export const bgCyan = formatter("\x1b[46m", "\x1b[49m");
|
|
66
|
+
export const bgWhite = formatter("\x1b[47m", "\x1b[49m");
|
|
67
|
+
//# sourceMappingURL=picocolors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["env","stdout","globalThis","process","enabled","NO_COLOR","FORCE_COLOR","isTTY","CI","TERM","replaceClose","str","close","replace","index","start","substring","end","length","nextIndex","indexOf","formatter","open","String","input","string","reset","s","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","purple","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite"],"sourceRoot":"../../../src","sources":["metro/picocolors.ts"],"mappings":";;AAAA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;EAAEA,GAAG;EAAEC;AAAO,CAAC,GAAGC,UAAU,EAAEC,OAAO,IAAI,CAAC,CAAC;AAEjD,MAAMC,OAAO,GACXJ,GAAG,IACH,CAACA,GAAG,CAACK,QAAQ,KACZL,GAAG,CAACM,WAAW,IAAKL,MAAM,EAAEM,KAAK,IAAI,CAACP,GAAG,CAACQ,EAAE,IAAIR,GAAG,CAACS,IAAI,KAAK,MAAO,CAAC;AA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U,CAAC;AACxD,OAAO,MAAM2B,QAAQ,GAAG3B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;AACzD,OAAO,MAAM4B,MAAM,GAAG5B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;AACvD,OAAO,MAAM6B,SAAS,GAAG7B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;AAC1D,OAAO,MAAM8B,MAAM,GAAG9B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;AACvD,OAAO,MAAM+B,OAAO,GAAG/B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { basename, resolve, sep } from "node:path";
|
|
4
|
+
import { allowedModules } from "../babel/allowedModules.js";
|
|
5
|
+
const thisModuleDist = resolve(__dirname, "../../../dist");
|
|
6
|
+
const thisModuleSrc = resolve(__dirname, "../../../src");
|
|
7
|
+
function isFromThisModule(filename) {
|
|
8
|
+
return filename.startsWith(thisModuleDist) || filename.startsWith(thisModuleSrc);
|
|
9
|
+
}
|
|
10
|
+
export function nativeResolver(resolver, context, moduleName, platform) {
|
|
11
|
+
const resolution = resolver(context, moduleName, platform);
|
|
12
|
+
if (
|
|
13
|
+
// Don't include our internal files
|
|
14
|
+
isFromThisModule(context.originModulePath) ||
|
|
15
|
+
// Only operate on source files
|
|
16
|
+
resolution.type !== "sourceFile" ||
|
|
17
|
+
// Skip the React Native barrel file to prevent infinite recursion
|
|
18
|
+
context.originModulePath.endsWith("react-native/index.js") ||
|
|
19
|
+
// Skip anything that isn't importing a React Native component
|
|
20
|
+
!(moduleName.startsWith("react-native") || moduleName.startsWith("react-native/"))) {
|
|
21
|
+
return resolution;
|
|
22
|
+
}
|
|
23
|
+
if (moduleName === "react-native") {
|
|
24
|
+
return resolver(context, `react-native-css/components`, platform);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// We only care about `react-native/Library/Components/<module>.js` components
|
|
28
|
+
const segments = resolution.filePath.split(sep);
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
30
|
+
const module = basename(segments.at(-1)).split(".")[0];
|
|
31
|
+
if (!module || !allowedModules.has(module)) {
|
|
32
|
+
return resolution;
|
|
33
|
+
}
|
|
34
|
+
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
35
|
+
}
|
|
36
|
+
export function webResolver(resolver, context, moduleName, platform) {
|
|
37
|
+
const resolution = resolver(context, moduleName, platform);
|
|
38
|
+
if (
|
|
39
|
+
// Don't include our internal files
|
|
40
|
+
isFromThisModule(context.originModulePath) ||
|
|
41
|
+
// Only operate on source files
|
|
42
|
+
resolution.type !== "sourceFile" ||
|
|
43
|
+
// Skip anything that isn't importing from `react-native-web`
|
|
44
|
+
!resolution.filePath.includes(`${sep}react-native-web${sep}`)) {
|
|
45
|
+
return resolution;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// We only care about `react-native-web/<segment>/<segment>/<module>/index.js` components
|
|
49
|
+
const segments = resolution.filePath.split(sep);
|
|
50
|
+
const isIndex = segments.at(-1)?.startsWith("index.");
|
|
51
|
+
const module = segments.at(-2);
|
|
52
|
+
if (!isIndex || !module || !allowedModules.has(module)) {
|
|
53
|
+
return resolution;
|
|
54
|
+
}
|
|
55
|
+
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["basename","resolve","sep","allowedModules","thisModuleDist","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","originModulePath","type","endsWith","segments","filePath","split","module","at","has","webResolver","includes","isIndex"],"sourceRoot":"../../../src","sources":["metro/resolver.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,OAAO,EAAEC,GAAG,QAAQ,WAAW;AAQlD,SAASC,cAAc,QAA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AAO,EAAE,+BAA+BU,MAAM,EAAE,EAAER,QAAQ,CAAC;AAC7E;AAEA,OAAO,SAASW,WAAWA,CACzBd,QAAwB,EACxBC,OAAgC,EAChCC,UAAkB,EAClBC,QAAuB,EACX;EACZ,MAAMC,UAAU,GAAGJ,QAAQ,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;EAE1D;EACE;EACAP,gBAAgB,CAACK,OAAO,CAACI,gBAAgB,CAAC;EAC1C;EACAD,UAAU,CAACE,IAAI,KAAK,YAAY;EAChC;EACA,CAACF,UAAU,CAACK,QAAQ,CAACM,QAAQ,CAAC,GAAGxB,GAAG,mBAAmBA,GAAG,EAAE,CAAC,EAC7D;IACA,OAAOa,UAAU;EACnB;;EAEA;EACA,MAAMI,QAAQ,GAAGJ,UAAU,CAACK,QAAQ,CAACC,KAAK,CAACnB,GAAG,CAAC;EAC/C,MAAMyB,OAAO,GAAGR,QAAQ,CAACI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAEd,UAAU,CAAC,QAAQ,CAAC;EACrD,MAAMa,MAAM,GAAGH,QAAQ,CAACI,EAAE,CAAC,CAAC,CAAC,CAAC;EAE9B,IAAI,CAACI,OAAO,IAAI,CAACL,MAAM,IAAI,CAACnB,cAAc,CAACqB,GAAG,CAACF,MAAM,CAAC,EAAE;IACtD,OAAOP,UAAU;EACnB;EAEA,OAAOJ,QAAQ,CAACC,OAAO,EAAE,+BAA+BU,MAAM,EAAE,EAAER,QAAQ,CAAC;AAC7E","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Convert a data structure to JavaScript.
|
|
6
|
+
* The output should be similar to JSON, but without the extra characters.
|
|
7
|
+
* This is simply to reduce file size in production
|
|
8
|
+
*/
|
|
9
|
+
export function stringify(data) {
|
|
10
|
+
switch (typeof data) {
|
|
11
|
+
case "bigint":
|
|
12
|
+
case "symbol":
|
|
13
|
+
case "function":
|
|
14
|
+
throw new Error(`Cannot stringify ${typeof data}`);
|
|
15
|
+
case "string":
|
|
16
|
+
return `"${data}"`;
|
|
17
|
+
case "number":
|
|
18
|
+
// Reduce to 3 decimal places
|
|
19
|
+
return `${Math.round(data * 1000) / 1000}`;
|
|
20
|
+
case "boolean":
|
|
21
|
+
return `${data}`;
|
|
22
|
+
case "undefined":
|
|
23
|
+
// null is processed faster than undefined
|
|
24
|
+
// JSON.stringify also converts undefined to null
|
|
25
|
+
return "null";
|
|
26
|
+
case "object":
|
|
27
|
+
{
|
|
28
|
+
if (data === null) {
|
|
29
|
+
return "null";
|
|
30
|
+
} else if (Array.isArray(data)) {
|
|
31
|
+
return `[${data.map(value => {
|
|
32
|
+
// These values can be omitted to create a holey array
|
|
33
|
+
// This is slightly slower to parse at runtime, but keeps the
|
|
34
|
+
// file size smaller
|
|
35
|
+
return value === null || value === undefined ? "" : stringify(value);
|
|
36
|
+
}).join(",")}]`;
|
|
37
|
+
} else {
|
|
38
|
+
return `{${Object.entries(data).flatMap(([key, value]) => {
|
|
39
|
+
// If an object's property is undefined or null we can just skip it
|
|
40
|
+
if (value === null || value === undefined) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Make sure we quote strings that require quotes
|
|
45
|
+
if (key.match(/[^a-zA-Z]/)) {
|
|
46
|
+
key = `"${key}"`;
|
|
47
|
+
}
|
|
48
|
+
value = stringify(value);
|
|
49
|
+
return [`${key}:${value}`];
|
|
50
|
+
}).join(",")}}`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=stringify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stringify","data","Error","Math","round","Array","isArray","map","value","undefined","join","Object","entries","flatMap","key","match"],"sourceRoot":"../../../src","sources":["metro/stringify.ts"],"mappings":";;AAAA;AACA;AACA;AACA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AAIN,KAAK,EAAE,CAAC;UAC5B,CAAC,CAAC,CACDE,IAAI,CAAC,GAAG,CAAC,GAAG;QACjB;MACF;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
5
|
+
import { CommentArray, parse, stringify } from "comment-json";
|
|
6
|
+
import { bold, cyan } from "./picocolors.js";
|
|
7
|
+
export function setupTypeScript(envPath = "react-native-css-env.d.ts", name = "react-native-css") {
|
|
8
|
+
try {
|
|
9
|
+
const ts = require("typescript");
|
|
10
|
+
if (!ts) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const configFileName = ts.findConfigFile("./", ts.sys.fileExists, "tsconfig.json");
|
|
14
|
+
const userConfig = parse(readFileSync(configFileName, {
|
|
15
|
+
encoding: "utf-8"
|
|
16
|
+
}));
|
|
17
|
+
if (typeof userConfig !== "object" || !userConfig || Array.isArray(userConfig)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const output = [];
|
|
21
|
+
let updatedConfig = false;
|
|
22
|
+
if (!existsSync(envPath)) {
|
|
23
|
+
writeFileSync(envPath, `/// <reference types="react-native-css/types" />
|
|
24
|
+
|
|
25
|
+
// NOTE: This file should not be edited and should be committed with your source code. It is generated by ${name}. If you need to move or disable this file, please see the documentation.`);
|
|
26
|
+
output.push(`Created ${cyan(envPath)}`);
|
|
27
|
+
}
|
|
28
|
+
userConfig.include ??= new CommentArray(envPath);
|
|
29
|
+
if (Array.isArray(userConfig.include) && !userConfig.include.includes(envPath)) {
|
|
30
|
+
userConfig.include.push(envPath);
|
|
31
|
+
updatedConfig = true;
|
|
32
|
+
output.push(`Updated ${configFileName} to include the ${cyan(envPath)} file`);
|
|
33
|
+
}
|
|
34
|
+
if (updatedConfig) {
|
|
35
|
+
writeFileSync(configFileName, stringify(userConfig, null, 2));
|
|
36
|
+
}
|
|
37
|
+
if (output.length) {
|
|
38
|
+
console.log(`${cyan(bold("NativeWind"))} made the following changes to your project to support TypeScript:\n - ${output.join("\n - ")}`);
|
|
39
|
+
}
|
|
40
|
+
} catch {}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=typescript.js.map
|