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,197 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type {
|
|
3
|
+
InlineVariable,
|
|
4
|
+
StyleDeclaration,
|
|
5
|
+
StyleRule,
|
|
6
|
+
} from "../../../compiler";
|
|
7
|
+
import { applyValue, getDeepPath, Specificity as S } from "../../utils";
|
|
8
|
+
import type { RenderGuard } from "../conditions/guards";
|
|
9
|
+
import {
|
|
10
|
+
VAR_SYMBOL,
|
|
11
|
+
type Getter,
|
|
12
|
+
type VariableContextValue,
|
|
13
|
+
} from "../reactivity";
|
|
14
|
+
import { transformKeys } from "./defaults";
|
|
15
|
+
import { resolveValue } from "./resolve";
|
|
16
|
+
|
|
17
|
+
export function calculateProps(
|
|
18
|
+
get: Getter,
|
|
19
|
+
rules: (StyleRule | InlineVariable | VariableContextValue)[],
|
|
20
|
+
guards: RenderGuard[] = [],
|
|
21
|
+
inheritedVariables: VariableContextValue = {
|
|
22
|
+
[VAR_SYMBOL]: true,
|
|
23
|
+
},
|
|
24
|
+
inlineVariables: InlineVariable = {
|
|
25
|
+
[VAR_SYMBOL]: "inline",
|
|
26
|
+
},
|
|
27
|
+
) {
|
|
28
|
+
let normal: Record<string, any> | undefined;
|
|
29
|
+
let important: Record<string, any> | undefined;
|
|
30
|
+
|
|
31
|
+
const delayedStyles: (() => void)[] = [];
|
|
32
|
+
const transformStyles: (() => void)[] = [];
|
|
33
|
+
|
|
34
|
+
for (const rule of rules) {
|
|
35
|
+
if (VAR_SYMBOL in rule) {
|
|
36
|
+
if (typeof rule[VAR_SYMBOL] === "string") {
|
|
37
|
+
Object.assign(inlineVariables, rule);
|
|
38
|
+
} else {
|
|
39
|
+
Object.assign(inheritedVariables, rule);
|
|
40
|
+
}
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (rule.v) {
|
|
45
|
+
for (const variable of rule.v) {
|
|
46
|
+
inlineVariables[variable[0]] = variable[1];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (rule.d) {
|
|
51
|
+
let topLevelTarget = rule.s?.[S.Important]
|
|
52
|
+
? (important ??= {})
|
|
53
|
+
: (normal ??= {});
|
|
54
|
+
let target = topLevelTarget;
|
|
55
|
+
|
|
56
|
+
const ruleTarget = rule.target || "style";
|
|
57
|
+
|
|
58
|
+
if (typeof ruleTarget === "string") {
|
|
59
|
+
target = target[ruleTarget] ??= {};
|
|
60
|
+
} else if (ruleTarget) {
|
|
61
|
+
for (const path of ruleTarget) {
|
|
62
|
+
target = target[path] ??= {};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
applyDeclarations(
|
|
67
|
+
get,
|
|
68
|
+
rule.d,
|
|
69
|
+
inlineVariables,
|
|
70
|
+
inheritedVariables,
|
|
71
|
+
delayedStyles,
|
|
72
|
+
transformStyles,
|
|
73
|
+
guards,
|
|
74
|
+
target,
|
|
75
|
+
topLevelTarget,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
for (const delayedStyle of delayedStyles) {
|
|
81
|
+
delayedStyle();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
for (const transformStyle of transformStyles) {
|
|
85
|
+
transformStyle();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
normal,
|
|
90
|
+
guards,
|
|
91
|
+
important,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function applyDeclarations(
|
|
96
|
+
get: Getter,
|
|
97
|
+
declarations: StyleDeclaration[],
|
|
98
|
+
inlineVariables: InlineVariable,
|
|
99
|
+
inheritedVariables: VariableContextValue,
|
|
100
|
+
delayedStyles: (() => void)[] = [],
|
|
101
|
+
transformStyles: (() => void)[] = [],
|
|
102
|
+
guards: RenderGuard[] = [],
|
|
103
|
+
target: Record<string, any> = {},
|
|
104
|
+
topLevelTarget = target,
|
|
105
|
+
) {
|
|
106
|
+
for (const declaration of declarations) {
|
|
107
|
+
if (!Array.isArray(declaration)) {
|
|
108
|
+
// Static styles
|
|
109
|
+
Object.assign(target, declaration);
|
|
110
|
+
} else {
|
|
111
|
+
// Dynamic styles
|
|
112
|
+
let value: any = declaration[0];
|
|
113
|
+
let propPath = declaration[1];
|
|
114
|
+
let prop: string;
|
|
115
|
+
|
|
116
|
+
if (Array.isArray(propPath)) {
|
|
117
|
+
const [first, ...rest] = propPath;
|
|
118
|
+
|
|
119
|
+
if (!first) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const final = rest.pop();
|
|
124
|
+
|
|
125
|
+
if (final) {
|
|
126
|
+
if (first !== "*") {
|
|
127
|
+
topLevelTarget[first] ??= {};
|
|
128
|
+
target = topLevelTarget[first];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
for (prop of rest) {
|
|
132
|
+
target[prop] ??= {};
|
|
133
|
+
target = target[prop];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
prop = final;
|
|
137
|
+
} else {
|
|
138
|
+
target = topLevelTarget;
|
|
139
|
+
prop = first;
|
|
140
|
+
}
|
|
141
|
+
} else {
|
|
142
|
+
prop = propPath;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const shouldDelay = declaration[2];
|
|
146
|
+
|
|
147
|
+
if (shouldDelay || transformKeys.has(prop)) {
|
|
148
|
+
/**
|
|
149
|
+
* We need to delay the resolution of this value until after all
|
|
150
|
+
* styles have been calculated. But another style might override
|
|
151
|
+
* this value. So we set a placeholder value and only override
|
|
152
|
+
* if the placeholder is preserved
|
|
153
|
+
*
|
|
154
|
+
* This also ensures the props exist, so setValue will properly
|
|
155
|
+
* mutate the props object and not create a new one
|
|
156
|
+
*/
|
|
157
|
+
const originalValue = value;
|
|
158
|
+
// This needs to be a object with the [prop] so we can discover in transform arrays
|
|
159
|
+
value = { [prop]: true };
|
|
160
|
+
|
|
161
|
+
if (transformKeys.has(prop)) {
|
|
162
|
+
transformStyles.push(() => {
|
|
163
|
+
value = resolveValue(originalValue, get, {
|
|
164
|
+
inlineVariables,
|
|
165
|
+
inheritedVariables,
|
|
166
|
+
renderGuards: guards,
|
|
167
|
+
calculateProps,
|
|
168
|
+
});
|
|
169
|
+
applyValue(target, prop, value);
|
|
170
|
+
});
|
|
171
|
+
} else {
|
|
172
|
+
delayedStyles.push(() => {
|
|
173
|
+
if (getDeepPath(target, prop) === value) {
|
|
174
|
+
delete target[prop];
|
|
175
|
+
value = resolveValue(originalValue, get, {
|
|
176
|
+
inlineVariables,
|
|
177
|
+
inheritedVariables,
|
|
178
|
+
renderGuards: guards,
|
|
179
|
+
calculateProps,
|
|
180
|
+
});
|
|
181
|
+
applyValue(target, prop, value);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
value = resolveValue(value, get, {
|
|
187
|
+
inlineVariables,
|
|
188
|
+
inheritedVariables,
|
|
189
|
+
renderGuards: guards,
|
|
190
|
+
calculateProps,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
applyValue(target, prop, value);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export const transformKeys = new Set([
|
|
3
|
+
"translate",
|
|
4
|
+
"translateX",
|
|
5
|
+
"translateY",
|
|
6
|
+
"scale",
|
|
7
|
+
"scaleX",
|
|
8
|
+
"scaleY",
|
|
9
|
+
"rotate",
|
|
10
|
+
"rotateX",
|
|
11
|
+
"rotateY",
|
|
12
|
+
"rotateZ",
|
|
13
|
+
"skewX",
|
|
14
|
+
"skewY",
|
|
15
|
+
"perspective",
|
|
16
|
+
"matrix",
|
|
17
|
+
"transformOrigin",
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
export const defaultValues: Record<string, any> = {
|
|
21
|
+
backgroundColor: "transparent",
|
|
22
|
+
borderBottomColor: "transparent",
|
|
23
|
+
borderBottomLeftRadius: 0,
|
|
24
|
+
borderBottomRightRadius: 0,
|
|
25
|
+
borderBottomWidth: 0,
|
|
26
|
+
borderColor: "transparent",
|
|
27
|
+
borderLeftColor: "transparent",
|
|
28
|
+
borderLeftWidth: 0,
|
|
29
|
+
borderRadius: 0,
|
|
30
|
+
borderRightColor: "transparent",
|
|
31
|
+
borderRightWidth: 0,
|
|
32
|
+
borderTopColor: "transparent",
|
|
33
|
+
borderTopWidth: 0,
|
|
34
|
+
borderWidth: 0,
|
|
35
|
+
bottom: 0,
|
|
36
|
+
color: "black",
|
|
37
|
+
flex: 1,
|
|
38
|
+
flexBasis: 1,
|
|
39
|
+
flexGrow: 1,
|
|
40
|
+
flexShrink: 0,
|
|
41
|
+
fontSize: 14,
|
|
42
|
+
fontWeight: "400",
|
|
43
|
+
gap: 0,
|
|
44
|
+
left: 0,
|
|
45
|
+
lineHeight: 14,
|
|
46
|
+
margin: 0,
|
|
47
|
+
marginBottom: 0,
|
|
48
|
+
marginLeft: 0,
|
|
49
|
+
marginRight: 0,
|
|
50
|
+
marginTop: 0,
|
|
51
|
+
maxHeight: 99999,
|
|
52
|
+
maxWidth: 99999,
|
|
53
|
+
minHeight: 0,
|
|
54
|
+
minWidth: 0,
|
|
55
|
+
opacity: 1,
|
|
56
|
+
padding: 0,
|
|
57
|
+
paddingBottom: 0,
|
|
58
|
+
paddingLeft: 0,
|
|
59
|
+
paddingRight: 0,
|
|
60
|
+
paddingTop: 0,
|
|
61
|
+
perspective: 1,
|
|
62
|
+
right: 0,
|
|
63
|
+
rotate: "0deg",
|
|
64
|
+
rotateX: "0deg",
|
|
65
|
+
rotateY: "0deg",
|
|
66
|
+
rotateZ: "0deg",
|
|
67
|
+
scale: 1,
|
|
68
|
+
scaleX: 1,
|
|
69
|
+
scaleY: 1,
|
|
70
|
+
skewX: "0deg",
|
|
71
|
+
skewY: "0deg",
|
|
72
|
+
textShadowRadius: 0,
|
|
73
|
+
top: 0,
|
|
74
|
+
transformOrigin: "50%",
|
|
75
|
+
translateX: 0,
|
|
76
|
+
translateY: 0,
|
|
77
|
+
width: 0,
|
|
78
|
+
zIndex: 0,
|
|
79
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { StyleFunctionResolver } from "../resolve";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
4
|
+
const advancedTimingFunctions: Record<
|
|
5
|
+
string,
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
() => (...args: any[]) => unknown
|
|
8
|
+
> = {
|
|
9
|
+
cubicBezier: () => {
|
|
10
|
+
return (
|
|
11
|
+
require("react-native-reanimated") as typeof import("react-native-reanimated")
|
|
12
|
+
).cubicBezier;
|
|
13
|
+
},
|
|
14
|
+
steps: () => {
|
|
15
|
+
return (
|
|
16
|
+
require("react-native-reanimated") as typeof import("react-native-reanimated")
|
|
17
|
+
).steps;
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const timingFunctionResolver: StyleFunctionResolver = (resolveValue, value) => {
|
|
22
|
+
const name = value[1];
|
|
23
|
+
const resolver = advancedTimingFunctions[name];
|
|
24
|
+
|
|
25
|
+
if (!resolver) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const args = resolveValue(value[2]);
|
|
30
|
+
|
|
31
|
+
if (!Array.isArray(args)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const fn = resolver();
|
|
36
|
+
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
38
|
+
const result = fn(...args);
|
|
39
|
+
|
|
40
|
+
return result;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const cubicBezier = timingFunctionResolver;
|
|
44
|
+
export const steps = timingFunctionResolver;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { StyleFunctionResolver } from "../resolve";
|
|
2
|
+
|
|
3
|
+
interface Value {
|
|
4
|
+
value: number;
|
|
5
|
+
isPercent: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const precedence: Record<string, number> = { "+": 1, "-": 1, "*": 2, "/": 2 };
|
|
9
|
+
|
|
10
|
+
export const calc: StyleFunctionResolver = (resolveValue, func) => {
|
|
11
|
+
const tokens = resolveValue(func[2]);
|
|
12
|
+
|
|
13
|
+
if (!Array.isArray(tokens)) {
|
|
14
|
+
return tokens;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// --- Step 1: Convert to RPN (Shunting-Yard) ---
|
|
18
|
+
const output: (string | Value)[] = [];
|
|
19
|
+
const ops: string[] = [];
|
|
20
|
+
|
|
21
|
+
for (const t of tokens) {
|
|
22
|
+
if (typeof t === "number") {
|
|
23
|
+
output.push({ value: round(t), isPercent: false });
|
|
24
|
+
} else if (typeof t === "string") {
|
|
25
|
+
if (t.endsWith("%")) {
|
|
26
|
+
const num = parseFloat(t.slice(0, -1));
|
|
27
|
+
if (Number.isNaN(num)) return undefined;
|
|
28
|
+
output.push({ value: round(num / 100), isPercent: true });
|
|
29
|
+
} else if (t === "+" || t === "-" || t === "*" || t === "/") {
|
|
30
|
+
while (
|
|
31
|
+
ops.length &&
|
|
32
|
+
(ops[ops.length - 1] === "+" ||
|
|
33
|
+
ops[ops.length - 1] === "-" ||
|
|
34
|
+
ops[ops.length - 1] === "*" ||
|
|
35
|
+
ops[ops.length - 1] === "/") &&
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
|
+
(precedence[ops[ops.length - 1]!] ?? 0) >= (precedence[t] ?? 0)
|
|
38
|
+
) {
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
40
|
+
output.push(ops.pop()!);
|
|
41
|
+
}
|
|
42
|
+
ops.push(t);
|
|
43
|
+
} else if (t === "(") {
|
|
44
|
+
ops.push(t);
|
|
45
|
+
} else if (t === ")") {
|
|
46
|
+
while (ops.length && ops[ops.length - 1] !== "(") {
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
48
|
+
output.push(ops.pop()!);
|
|
49
|
+
}
|
|
50
|
+
if (ops.pop() !== "(") return undefined; // mismatched parens
|
|
51
|
+
} else {
|
|
52
|
+
return undefined; // invalid token
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
while (ops.length) {
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
60
|
+
const op = ops.pop()!;
|
|
61
|
+
if (op === "(" || op === ")") return undefined;
|
|
62
|
+
output.push(op);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// --- Step 2: Evaluate RPN ---
|
|
66
|
+
const stack: Value[] = [];
|
|
67
|
+
for (const t of output) {
|
|
68
|
+
if (typeof t !== "string") {
|
|
69
|
+
stack.push(t);
|
|
70
|
+
} else {
|
|
71
|
+
const b = stack.pop();
|
|
72
|
+
const a = stack.pop();
|
|
73
|
+
if (!a || !b) return undefined;
|
|
74
|
+
|
|
75
|
+
const res: Value = { value: 0, isPercent: false };
|
|
76
|
+
|
|
77
|
+
switch (t) {
|
|
78
|
+
case "+":
|
|
79
|
+
case "-": {
|
|
80
|
+
if (a.isPercent !== b.isPercent) return undefined; // cannot mix
|
|
81
|
+
res.isPercent = a.isPercent;
|
|
82
|
+
res.value =
|
|
83
|
+
t === "+" ? round(a.value + b.value) : round(a.value - b.value);
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
case "*": {
|
|
87
|
+
if (a.isPercent && b.isPercent) return undefined; // ambiguous
|
|
88
|
+
res.isPercent = a.isPercent || b.isPercent;
|
|
89
|
+
res.value = round(a.value * b.value);
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case "/": {
|
|
93
|
+
if (b.value === 0) return undefined;
|
|
94
|
+
if (a.isPercent && b.isPercent) {
|
|
95
|
+
// % / % → plain number ratio
|
|
96
|
+
res.isPercent = false;
|
|
97
|
+
res.value = round(a.value / b.value);
|
|
98
|
+
} else {
|
|
99
|
+
res.isPercent = a.isPercent || b.isPercent;
|
|
100
|
+
res.value = round(a.value / b.value);
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
stack.push(res);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (stack.length !== 1) return undefined;
|
|
110
|
+
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
112
|
+
const final = stack[0]!;
|
|
113
|
+
if (final.isPercent) {
|
|
114
|
+
return `${final.value * 100}%`;
|
|
115
|
+
}
|
|
116
|
+
return final.value;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
function round(number: number) {
|
|
120
|
+
return Math.round((number + Number.EPSILON) * 10000) / 10000;
|
|
121
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { isStyleDescriptorArray } from "../../../utils";
|
|
2
|
+
import type { StyleFunctionResolver } from "../resolve";
|
|
3
|
+
import { shorthandHandler } from "../shorthands/_handler";
|
|
4
|
+
|
|
5
|
+
export const blur: StyleFunctionResolver = (resolveValue, value) => {
|
|
6
|
+
const args = resolveValue(value[2]);
|
|
7
|
+
return {
|
|
8
|
+
blur: (Array.isArray(args) ? args[0] : args) as unknown,
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const brightness: StyleFunctionResolver = (resolveValue, value) => {
|
|
13
|
+
const args = resolveValue(value[2]);
|
|
14
|
+
return {
|
|
15
|
+
brightness: (Array.isArray(args) ? args[0] : args) as unknown,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const contrast: StyleFunctionResolver = (resolveValue, value) => {
|
|
20
|
+
const args = resolveValue(value[2]);
|
|
21
|
+
return {
|
|
22
|
+
contrast: (Array.isArray(args) ? args[0] : args) as unknown,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const grayscale: StyleFunctionResolver = (resolveValue, value) => {
|
|
27
|
+
const args = resolveValue(value[2]);
|
|
28
|
+
return {
|
|
29
|
+
grayscale: (Array.isArray(args) ? args[0] : args) as unknown,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const hueRotate: StyleFunctionResolver = (resolveValue, value) => {
|
|
34
|
+
const args = resolveValue(value[2]);
|
|
35
|
+
return {
|
|
36
|
+
hueRotate: (Array.isArray(args) ? args[0] : args) as unknown,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const invert: StyleFunctionResolver = (resolveValue, value) => {
|
|
41
|
+
const args = resolveValue(value[2]);
|
|
42
|
+
return {
|
|
43
|
+
invert: (Array.isArray(args) ? args[0] : args) as unknown,
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const sepia: StyleFunctionResolver = (resolveValue, value) => {
|
|
48
|
+
const args = resolveValue(value[2]);
|
|
49
|
+
return {
|
|
50
|
+
sepia: (Array.isArray(args) ? args[0] : args) as unknown,
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const saturate: StyleFunctionResolver = (resolveValue, value) => {
|
|
55
|
+
const args = resolveValue(value[2]);
|
|
56
|
+
return {
|
|
57
|
+
saturate: (Array.isArray(args) ? args[0] : args) as unknown,
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const opacity: StyleFunctionResolver = (resolveValue, value) => {
|
|
62
|
+
const args = resolveValue(value[2]);
|
|
63
|
+
return {
|
|
64
|
+
hueRotate: (Array.isArray(args) ? args[0] : args) as unknown,
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const color = ["color", "string"] as const;
|
|
69
|
+
const offsetX = ["offsetX", "number"] as const;
|
|
70
|
+
const offsetY = ["offsetY", "number"] as const;
|
|
71
|
+
const blurRadius = ["blurRadius", "number"] as const;
|
|
72
|
+
|
|
73
|
+
const handler = shorthandHandler(
|
|
74
|
+
[
|
|
75
|
+
[offsetX, offsetY, blurRadius, color],
|
|
76
|
+
[color, offsetX, offsetY],
|
|
77
|
+
[color, offsetX, offsetY, blurRadius],
|
|
78
|
+
[offsetX, offsetY, color],
|
|
79
|
+
[offsetX, offsetY, blurRadius, color],
|
|
80
|
+
],
|
|
81
|
+
[],
|
|
82
|
+
"object",
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
export const dropShadow: StyleFunctionResolver = (
|
|
86
|
+
resolveValue,
|
|
87
|
+
func,
|
|
88
|
+
get,
|
|
89
|
+
options,
|
|
90
|
+
) => {
|
|
91
|
+
const args = resolveValue(func[2]);
|
|
92
|
+
|
|
93
|
+
return isStyleDescriptorArray(args)
|
|
94
|
+
? {
|
|
95
|
+
dropShadow: handler(resolveValue, args, get, options),
|
|
96
|
+
}
|
|
97
|
+
: undefined;
|
|
98
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { PixelRatio, PlatformColor, StyleSheet } from "react-native";
|
|
2
|
+
|
|
3
|
+
import type { StyleFunctionResolver } from "../resolve";
|
|
4
|
+
|
|
5
|
+
export const platformColor: StyleFunctionResolver = (resolveValue, value) => {
|
|
6
|
+
const color: unknown = resolveValue(value[2]);
|
|
7
|
+
if (Array.isArray(color)) {
|
|
8
|
+
return PlatformColor(...(color as string[]));
|
|
9
|
+
} else if (typeof color === "string") {
|
|
10
|
+
return PlatformColor(color);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const hairlineWidth: StyleFunctionResolver = () => {
|
|
17
|
+
return StyleSheet.hairlineWidth;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const pixelRatio: StyleFunctionResolver = () => {
|
|
21
|
+
return PixelRatio.get();
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const fontScale: StyleFunctionResolver = () => {
|
|
25
|
+
return PixelRatio.getFontScale();
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const getPixelSizeForLayoutSize: StyleFunctionResolver = (
|
|
29
|
+
resolveValue,
|
|
30
|
+
value,
|
|
31
|
+
) => {
|
|
32
|
+
const size: unknown = resolveValue(value[2]);
|
|
33
|
+
if (typeof size === "number") {
|
|
34
|
+
return PixelRatio.getPixelSizeForLayoutSize(size);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const roundToNearestPixel: StyleFunctionResolver = (
|
|
41
|
+
resolveValue,
|
|
42
|
+
value,
|
|
43
|
+
) => {
|
|
44
|
+
const size: unknown = resolveValue(value[2]);
|
|
45
|
+
if (typeof size === "number") {
|
|
46
|
+
return PixelRatio.roundToNearestPixel(size);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return;
|
|
50
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { isStyleDescriptorArray } from "../../../utils";
|
|
2
|
+
import type { StyleFunctionResolver } from "../resolve";
|
|
3
|
+
|
|
4
|
+
export const scale: StyleFunctionResolver = (resolveValue, descriptor) => {
|
|
5
|
+
const args = descriptor[2];
|
|
6
|
+
|
|
7
|
+
if (!isStyleDescriptorArray(args)) {
|
|
8
|
+
return { scale: resolveValue(args) };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const x = resolveValue(args[0]);
|
|
12
|
+
const y = resolveValue(args[1]);
|
|
13
|
+
|
|
14
|
+
const isXValid = typeof x === "string" || typeof x === "number";
|
|
15
|
+
const isYValid = typeof y === "string" || typeof y === "number";
|
|
16
|
+
|
|
17
|
+
if (isXValid && isYValid) {
|
|
18
|
+
return x === y ? { scale: x } : [{ scaleX: x }, { scaleY: y }];
|
|
19
|
+
} else if (isXValid) {
|
|
20
|
+
return { scaleX: x };
|
|
21
|
+
} else if (isYValid) {
|
|
22
|
+
return { scaleY: y };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const rotate: StyleFunctionResolver = (resolveValue, descriptor) => {
|
|
29
|
+
const args = descriptor[2];
|
|
30
|
+
|
|
31
|
+
if (!isStyleDescriptorArray(args)) {
|
|
32
|
+
return { rotate: resolveValue(args) };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const x = resolveValue(args[0]);
|
|
36
|
+
const y = resolveValue(args[1]);
|
|
37
|
+
const z = resolveValue(args[2]);
|
|
38
|
+
|
|
39
|
+
const isXValid = typeof x === "string" || typeof x === "number";
|
|
40
|
+
const isYValid = typeof y === "string" || typeof y === "number";
|
|
41
|
+
const isZValid = typeof z === "string" || typeof z === "number";
|
|
42
|
+
|
|
43
|
+
if (isXValid && isYValid && isZValid) {
|
|
44
|
+
return [{ rotateX: x }, { rotateY: y }, { rotateZ: z }];
|
|
45
|
+
} else if (isXValid && isYValid) {
|
|
46
|
+
return [{ rotateX: x }, { rotateY: y }];
|
|
47
|
+
} else if (isXValid && isZValid) {
|
|
48
|
+
return [{ rotateX: x }, { rotateZ: z }];
|
|
49
|
+
} else if (isYValid && isZValid) {
|
|
50
|
+
return [{ rotateY: y }, { rotateZ: z }];
|
|
51
|
+
} else if (isXValid) {
|
|
52
|
+
return { rotateX: x };
|
|
53
|
+
} else if (isYValid) {
|
|
54
|
+
return { rotateY: y };
|
|
55
|
+
} else if (isZValid) {
|
|
56
|
+
return { rotateZ: z };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const translate: StyleFunctionResolver = (resolveValue, descriptor) => {
|
|
63
|
+
const args = descriptor[2];
|
|
64
|
+
|
|
65
|
+
if (!isStyleDescriptorArray(args)) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const x = resolveValue(args[0]);
|
|
70
|
+
const y = resolveValue(args[1]);
|
|
71
|
+
|
|
72
|
+
const isXValid = typeof x === "string" || typeof x === "number";
|
|
73
|
+
const isYValid = typeof y === "string" || typeof y === "number";
|
|
74
|
+
|
|
75
|
+
if (isXValid && isYValid) {
|
|
76
|
+
return [{ translateX: x }, { translateY: y }];
|
|
77
|
+
} else if (isXValid) {
|
|
78
|
+
return { translateX: x };
|
|
79
|
+
} else if (isYValid) {
|
|
80
|
+
return { translateY: y };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return;
|
|
84
|
+
};
|