react-native-css 2.1.1 → 3.0.0-nightly.0
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 +2196 -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/components/react-native-safe-area-context.js +17 -0
- package/dist/commonjs/components/react-native-safe-area-context.js.map +1 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js +53 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -0
- package/dist/commonjs/index.js +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 +170 -0
- package/dist/commonjs/metro/index.js.map +1 -0
- package/dist/commonjs/metro/injection-code.js +27 -0
- package/dist/commonjs/metro/injection-code.js.map +1 -0
- package/dist/commonjs/metro/metro-transformer.js +31 -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 +65 -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 +96 -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/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 +259 -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 +189 -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/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 +83 -0
- package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js +32 -0
- package/dist/commonjs/runtime/native/styles/functions/numeric-functions.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/string-functions.js +23 -0
- package/dist/commonjs/runtime/native/styles/functions/string-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 +50 -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/commonjs/style-collection/index.js +110 -0
- package/dist/commonjs/style-collection/index.js.map +1 -0
- package/dist/commonjs/style-collection/root.js +28 -0
- package/dist/commonjs/style-collection/root.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 +2121 -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/components/react-native-safe-area-context.js +4 -0
- package/dist/module/components/react-native-safe-area-context.js.map +1 -0
- package/dist/module/components/react-native-safe-area-context.native.js +36 -0
- package/dist/module/components/react-native-safe-area-context.native.js.map +1 -0
- package/dist/module/index.js +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 +164 -0
- package/dist/module/metro/index.js.map +1 -0
- package/dist/module/metro/injection-code.js +22 -0
- package/dist/module/metro/injection-code.js.map +1 -0
- package/dist/module/metro/metro-transformer.js +27 -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 +60 -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 +76 -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/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 +251 -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 +177 -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/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 +10 -0
- package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/numeric-functions.js +25 -0
- package/dist/module/runtime/native/styles/functions/numeric-functions.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/string-functions.js +18 -0
- package/dist/module/runtime/native/styles/functions/string-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 +45 -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/module/style-collection/index.js +95 -0
- package/dist/module/style-collection/index.js.map +1 -0
- package/dist/module/style-collection/root.js +24 -0
- package/dist/module/style-collection/root.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 +120 -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/components/react-native-safe-area-context.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/index.d.ts +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 +13 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +6 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/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 +19 -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/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/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 +8 -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/numeric-functions.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.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/string-functions.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-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/commonjs/src/style-collection/index.d.ts +14 -0
- package/dist/typescript/commonjs/src/style-collection/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/style-collection/root.d.ts +11 -0
- package/dist/typescript/commonjs/src/style-collection/root.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 +120 -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/components/react-native-safe-area-context.d.ts +2 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts.map +1 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +4 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
- package/dist/typescript/module/src/index.d.ts +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 +13 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +6 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/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 +19 -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/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/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 +8 -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/numeric-functions.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.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/string-functions.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/string-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/dist/typescript/module/src/style-collection/index.d.ts +14 -0
- package/dist/typescript/module/src/style-collection/index.d.ts.map +1 -0
- package/dist/typescript/module/src/style-collection/root.d.ts +11 -0
- package/dist/typescript/module/src/style-collection/root.d.ts.map +1 -0
- package/package.json +262 -45
- package/src/babel/allowedModules.ts +24 -0
- package/src/babel/helpers.ts +40 -0
- package/src/babel/import-plugin.ts +176 -0
- package/src/babel/index.ts +9 -0
- package/src/babel/react-native-web.ts +226 -0
- package/src/babel/react-native.ts +226 -0
- package/src/compiler/atRules.ts +158 -0
- package/src/compiler/compiler.ts +306 -0
- package/src/compiler/compiler.types.ts +266 -0
- package/src/compiler/container-query.ts +97 -0
- package/src/compiler/declarations.ts +3237 -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/components/react-native-safe-area-context.native.tsx +40 -0
- package/src/components/react-native-safe-area-context.tsx +1 -0
- package/src/index.ts +3 -0
- package/src/jest/expect.d.ts +1 -0
- package/src/jest/index.ts +75 -0
- package/src/jest/setup.ts +1 -0
- package/src/jest/setupAfterEnv.ts +13 -0
- package/src/metro/index.ts +239 -0
- package/src/metro/injection-code.ts +34 -0
- package/src/metro/metro-transformer.ts +48 -0
- package/src/metro/picocolors.ts +77 -0
- package/src/metro/resolver.ts +97 -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 +108 -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/metro.ts +2 -0
- package/src/runtime/native/react/interaction.ts +90 -0
- package/src/runtime/native/react/rules.ts +336 -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 +255 -0
- package/src/runtime/native/reanimated.ts +22 -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 +7 -0
- package/src/runtime/native/styles/functions/numeric-functions.ts +38 -0
- package/src/runtime/native/styles/functions/platform-functions.ts +50 -0
- package/src/runtime/native/styles/functions/string-functions.ts +22 -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 +123 -0
- package/src/runtime/native/styles/shorthands/border.ts +10 -0
- package/src/runtime/native/styles/shorthands/box-shadow.ts +74 -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 +88 -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/src/style-collection/index.ts +142 -0
- package/src/style-collection/root.ts +35 -0
- package/types.d.ts +70 -0
- package/.babelrc +0 -8
- package/.editorconfig +0 -17
- package/.eslintignore +0 -3
- package/.eslintrc +0 -39
- package/.npmignore +0 -7
- package/build/index.js +0 -294
- package/build/utils.js +0 -54
- package/circle.yml +0 -31
- package/jsconfig.json +0 -9
- package/login.sh +0 -11
- package/src/index.js +0 -184
- package/src/utils.js +0 -32
- package/test/rnc.test.js +0 -258
- package/yarn.lock +0 -3333
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { createContext } from "react";
|
|
5
|
+
import { Appearance, Dimensions } from "react-native";
|
|
6
|
+
export const observableBatch = {};
|
|
7
|
+
export function observable(init, equality = Object.is) {
|
|
8
|
+
let value;
|
|
9
|
+
let isStatic = typeof init !== "function";
|
|
10
|
+
let didInit;
|
|
11
|
+
let lastArg;
|
|
12
|
+
if (typeof init !== "function") {
|
|
13
|
+
value = init;
|
|
14
|
+
didInit = true;
|
|
15
|
+
}
|
|
16
|
+
const observers = new Set();
|
|
17
|
+
const effect = {
|
|
18
|
+
observers,
|
|
19
|
+
run: () => {
|
|
20
|
+
if (!isStatic) {
|
|
21
|
+
const nextValue = init(getter, lastArg);
|
|
22
|
+
if (equality(value, nextValue)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
value = nextValue;
|
|
26
|
+
}
|
|
27
|
+
notify();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const getter = observable => observable.get(effect);
|
|
31
|
+
function get(effect) {
|
|
32
|
+
if (effect) {
|
|
33
|
+
observers.add(effect);
|
|
34
|
+
}
|
|
35
|
+
if (!didInit) {
|
|
36
|
+
value = init(getter, undefined);
|
|
37
|
+
}
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
function set(arg) {
|
|
41
|
+
if (isStatic) {
|
|
42
|
+
if (equality(value, arg)) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
value = arg;
|
|
46
|
+
} else {
|
|
47
|
+
const nextValue = init(getter, arg);
|
|
48
|
+
didInit = true;
|
|
49
|
+
lastArg = arg;
|
|
50
|
+
if (equality(value, nextValue)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
value = nextValue;
|
|
54
|
+
}
|
|
55
|
+
notify();
|
|
56
|
+
return obs;
|
|
57
|
+
}
|
|
58
|
+
function notify() {
|
|
59
|
+
Array.from(observers).forEach(observer => {
|
|
60
|
+
if (observableBatch.current) {
|
|
61
|
+
observableBatch.current.add(observer);
|
|
62
|
+
} else {
|
|
63
|
+
observer.run();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
const obs = {
|
|
68
|
+
observers,
|
|
69
|
+
get,
|
|
70
|
+
set,
|
|
71
|
+
run: effect.run
|
|
72
|
+
};
|
|
73
|
+
return obs;
|
|
74
|
+
}
|
|
75
|
+
export function cleanupEffect(effect) {
|
|
76
|
+
if (!effect) return;
|
|
77
|
+
for (const dep of effect.observers) {
|
|
78
|
+
dep.observers.delete(effect);
|
|
79
|
+
}
|
|
80
|
+
effect.observers.clear();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Family Helpers ************************************************************/
|
|
84
|
+
|
|
85
|
+
export function family(fn) {
|
|
86
|
+
const map = new Map();
|
|
87
|
+
return Object.assign((key, args) => {
|
|
88
|
+
let value = map.get(key);
|
|
89
|
+
if (!value) {
|
|
90
|
+
value = fn(key, args);
|
|
91
|
+
map.set(key, value);
|
|
92
|
+
}
|
|
93
|
+
return value;
|
|
94
|
+
}, {
|
|
95
|
+
delete(key) {
|
|
96
|
+
return map.delete(key);
|
|
97
|
+
},
|
|
98
|
+
clear() {
|
|
99
|
+
return map.clear();
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export function weakFamily(fn) {
|
|
104
|
+
const map = new WeakMap();
|
|
105
|
+
return Object.assign((key, args) => {
|
|
106
|
+
let value = map.get(key);
|
|
107
|
+
if (!value) {
|
|
108
|
+
value = fn(key, args);
|
|
109
|
+
map.set(key, value);
|
|
110
|
+
}
|
|
111
|
+
return value;
|
|
112
|
+
}, {
|
|
113
|
+
has: key => map.has(key)
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/********************************* Variables **********************************/
|
|
118
|
+
|
|
119
|
+
export const VAR_SYMBOL = Symbol("react-native-css.var");
|
|
120
|
+
export const VariableContext = /*#__PURE__*/createContext({
|
|
121
|
+
[VAR_SYMBOL]: true
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
/** Units *********************************************************************/
|
|
125
|
+
|
|
126
|
+
export const rem = observable(14);
|
|
127
|
+
|
|
128
|
+
/** Pseudo Classes ************************************************************/
|
|
129
|
+
|
|
130
|
+
export const hoverFamily = weakFamily(() => observable(false));
|
|
131
|
+
export const activeFamily = weakFamily(() => observable(false));
|
|
132
|
+
export const focusFamily = weakFamily(() => observable(false));
|
|
133
|
+
|
|
134
|
+
/** Dimensions ****************************************************************/
|
|
135
|
+
|
|
136
|
+
export const dimensions = observable(Dimensions.get("window"));
|
|
137
|
+
export const vw = observable((read, value) => value ?? read(dimensions)?.width);
|
|
138
|
+
export const vh = observable((read, value) => value ?? read(dimensions)?.height);
|
|
139
|
+
Dimensions.addEventListener("change", ({
|
|
140
|
+
window
|
|
141
|
+
}) => {
|
|
142
|
+
observableBatch.current = new Set();
|
|
143
|
+
vw.set(window.width);
|
|
144
|
+
vh.set(window.height);
|
|
145
|
+
for (const effect of observableBatch.current) {
|
|
146
|
+
effect.run();
|
|
147
|
+
}
|
|
148
|
+
observableBatch.current = undefined;
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
/** Color Scheme **************************************************************/
|
|
152
|
+
|
|
153
|
+
export const colorScheme = observable(Appearance.getColorScheme());
|
|
154
|
+
Appearance.addChangeListener(event => colorScheme.set(event.colorScheme));
|
|
155
|
+
|
|
156
|
+
/** Containers ****************************************************************/
|
|
157
|
+
|
|
158
|
+
export const ContainerContext = /*#__PURE__*/createContext({});
|
|
159
|
+
export const containerLayoutFamily = weakFamily(() => {
|
|
160
|
+
return observable({
|
|
161
|
+
x: 0,
|
|
162
|
+
y: 0,
|
|
163
|
+
width: 0,
|
|
164
|
+
height: 0
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
export const containerWidthFamily = weakFamily(key => {
|
|
168
|
+
return observable(read => {
|
|
169
|
+
return read(containerLayoutFamily(key))?.width || 0;
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
export const containerHeightFamily = weakFamily(key => {
|
|
173
|
+
return observable(read => {
|
|
174
|
+
return read(containerLayoutFamily(key))?.width || 0;
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
//# sourceMappingURL=reactivity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","Appearance","Dimensions","observableBatch","observable","init","equality","Object","is","value","isStatic","didInit","lastArg","observers","Set","effect","run","nextValue","getter","notify","get","add","undefined","set","arg","obs","Array","from","forEach","observer","current","cleanupEffect","dep","delete","clear","family","fn","map","Map","assign","key","args","weakFamily","WeakMap","has","VAR_SYMBOL","Symbol","VariableContext","rem","hoverFamily","activeFamily","focusFamily","dimensions","vw","read","width","vh","height","addEventListener","window","colorScheme","getColorScheme","addChangeListener","event","ContainerContext","containerLayoutFamily","x","y","containerWidthFamily","containerHeightFamily"],"sourceRoot":"../../../../src","sources":["runtime/native/reactivity.ts"],"mappings":";;AAAA;AACA,SAASA,aAAa,QAAQ,OAAO;AACrC,SACEC,UAAU,EACVC,UAAU,QAGL,cAAc;AAkBrB,OAAO,MAAMC,eAEZ,GAAG,CAAC,CAAC;AAEN,OAAO,SAASC,UAAUA,CACxBC,IAA8B,EAC9BC,QAAmD,GAAGC,MAAM,CAACC,EAAE,EAC/D;EACA,IAAIC,KAAY;EAChB,IAAIC,QAAQ,GAAG,OAAOL,IAAI,KAAK,UAAU;EACzC,IAAIM,OAA4B;EAChC,IAAIC,OAAwB;EA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IAAI,IAAK;IAC1B,OAAOA,IAAI,CAACW,qBAAqB,CAACzB,GAAG,CAAC,CAAC,EAAEe,KAAK,IAAI,CAAC;EACrD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,MAAMc,qBAAqB,GAAG3B,UAAU,CAAEF,GAAG,IAAK;EACvD,OAAOpC,UAAU,CAAEkD,IAAI,IAAK;IAC1B,OAAOA,IAAI,CAACW,qBAAqB,CAACzB,GAAG,CAAC,CAAC,EAAEe,KAAK,IAAI,CAAC;EACrD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { weakFamily } from "./reactivity.js";
|
|
4
|
+
export const animatedComponentFamily = weakFamily(component => {
|
|
5
|
+
if ("displayName" in component && component.displayName?.startsWith("Animated.")) {
|
|
6
|
+
return component;
|
|
7
|
+
}
|
|
8
|
+
const createAnimatedComponent =
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-member-access
|
|
10
|
+
require("react-native-reanimated").createAnimatedComponent;
|
|
11
|
+
return createAnimatedComponent(component);
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=reanimated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["weakFamily","animatedComponentFamily","component","displayName","startsWith","createAnimatedComponent","require"],"sourceRoot":"../../../../src","sources":["runtime/native/reanimated.ts"],"mappings":";;AAEA,SAASA,UAAU,QAAQ,iBAAc;AAEzC,OAAO,MAAMC,uBAAuB,GAAGD,UAAU,CAC9CE,SAAwB,IAAK;EAC5B,IACE,aAAa,IAAIA,SAAS,IAC1BA,SAAS,CAACC,WAAW,EAAEC,UAAU,CAAC,WAAW,CAAC,EAC9C;IACA,OAAOF,SAAS;EAClB;EAEA,MAAMG,uBAAuB;EAC3B;EACAC,OAAO,CAAC,yBAAyB,CAAC,CAACD,uBAEjB;EAEpB,OAAOA,uBAAuB,CAACH,SAAS,CAAC;AAC3C,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import { applyValue, getDeepPath, Specificity as S } from "../../utils/index.js";
|
|
6
|
+
import { VAR_SYMBOL } from "../reactivity.js";
|
|
7
|
+
import { transformKeys } from "./defaults.js";
|
|
8
|
+
import { resolveValue } from "./resolve.js";
|
|
9
|
+
export function calculateProps(get, rules, guards = [], inheritedVariables = {
|
|
10
|
+
[VAR_SYMBOL]: true
|
|
11
|
+
}, inlineVariables = {
|
|
12
|
+
[VAR_SYMBOL]: "inline"
|
|
13
|
+
}) {
|
|
14
|
+
let normal;
|
|
15
|
+
let important;
|
|
16
|
+
const delayedStyles = [];
|
|
17
|
+
const transformStyles = [];
|
|
18
|
+
for (const rule of rules) {
|
|
19
|
+
if (VAR_SYMBOL in rule) {
|
|
20
|
+
if (typeof rule[VAR_SYMBOL] === "string") {
|
|
21
|
+
Object.assign(inlineVariables, rule);
|
|
22
|
+
} else {
|
|
23
|
+
Object.assign(inheritedVariables, rule);
|
|
24
|
+
}
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (rule.v) {
|
|
28
|
+
for (const variable of rule.v) {
|
|
29
|
+
inlineVariables[variable[0]] = variable[1];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (rule.d) {
|
|
33
|
+
let topLevelTarget = rule.s?.[S.Important] ? important ??= {} : normal ??= {};
|
|
34
|
+
let target = topLevelTarget;
|
|
35
|
+
const ruleTarget = rule.target || "style";
|
|
36
|
+
if (typeof ruleTarget === "string") {
|
|
37
|
+
target = target[ruleTarget] ??= {};
|
|
38
|
+
} else if (ruleTarget) {
|
|
39
|
+
for (const path of ruleTarget) {
|
|
40
|
+
target = target[path] ??= {};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
applyDeclarations(get, rule.d, inlineVariables, inheritedVariables, delayedStyles, transformStyles, guards, target, topLevelTarget);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
for (const delayedStyle of delayedStyles) {
|
|
47
|
+
delayedStyle();
|
|
48
|
+
}
|
|
49
|
+
for (const transformStyle of transformStyles) {
|
|
50
|
+
transformStyle();
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
normal,
|
|
54
|
+
guards,
|
|
55
|
+
important
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function applyDeclarations(get, declarations, inlineVariables, inheritedVariables, delayedStyles = [], transformStyles = [], guards = [], target = {}, topLevelTarget = target) {
|
|
59
|
+
for (const declaration of declarations) {
|
|
60
|
+
if (!Array.isArray(declaration)) {
|
|
61
|
+
// Static styles
|
|
62
|
+
Object.assign(target, declaration);
|
|
63
|
+
} else {
|
|
64
|
+
// Dynamic styles
|
|
65
|
+
let value = declaration[0];
|
|
66
|
+
let propPath = declaration[1];
|
|
67
|
+
let prop;
|
|
68
|
+
if (Array.isArray(propPath)) {
|
|
69
|
+
const [first, ...rest] = propPath;
|
|
70
|
+
if (!first) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
const final = rest.pop();
|
|
74
|
+
if (final) {
|
|
75
|
+
if (first !== "*") {
|
|
76
|
+
topLevelTarget[first] ??= {};
|
|
77
|
+
target = topLevelTarget[first];
|
|
78
|
+
}
|
|
79
|
+
for (prop of rest) {
|
|
80
|
+
target[prop] ??= {};
|
|
81
|
+
target = target[prop];
|
|
82
|
+
}
|
|
83
|
+
prop = final;
|
|
84
|
+
} else {
|
|
85
|
+
target = topLevelTarget;
|
|
86
|
+
prop = first;
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
prop = propPath;
|
|
90
|
+
}
|
|
91
|
+
const shouldDelay = declaration[2];
|
|
92
|
+
if (shouldDelay || transformKeys.has(prop)) {
|
|
93
|
+
/**
|
|
94
|
+
* We need to delay the resolution of this value until after all
|
|
95
|
+
* styles have been calculated. But another style might override
|
|
96
|
+
* this value. So we set a placeholder value and only override
|
|
97
|
+
* if the placeholder is preserved
|
|
98
|
+
*
|
|
99
|
+
* This also ensures the props exist, so setValue will properly
|
|
100
|
+
* mutate the props object and not create a new one
|
|
101
|
+
*/
|
|
102
|
+
const originalValue = value;
|
|
103
|
+
// This needs to be a object with the [prop] so we can discover in transform arrays
|
|
104
|
+
value = {
|
|
105
|
+
[prop]: true
|
|
106
|
+
};
|
|
107
|
+
if (transformKeys.has(prop)) {
|
|
108
|
+
transformStyles.push(() => {
|
|
109
|
+
value = resolveValue(originalValue, get, {
|
|
110
|
+
inlineVariables,
|
|
111
|
+
inheritedVariables,
|
|
112
|
+
renderGuards: guards,
|
|
113
|
+
calculateProps
|
|
114
|
+
});
|
|
115
|
+
applyValue(target, prop, value);
|
|
116
|
+
});
|
|
117
|
+
} else {
|
|
118
|
+
delayedStyles.push(() => {
|
|
119
|
+
if (getDeepPath(target, prop) === value) {
|
|
120
|
+
delete target[prop];
|
|
121
|
+
value = resolveValue(originalValue, get, {
|
|
122
|
+
inlineVariables,
|
|
123
|
+
inheritedVariables,
|
|
124
|
+
renderGuards: guards,
|
|
125
|
+
calculateProps
|
|
126
|
+
});
|
|
127
|
+
applyValue(target, prop, value);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
value = resolveValue(value, get, {
|
|
133
|
+
inlineVariables,
|
|
134
|
+
inheritedVariables,
|
|
135
|
+
renderGuards: guards,
|
|
136
|
+
calculateProps
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
applyValue(target, prop, value);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=calculate-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["applyValue","getDeepPath","Specificity","S","VAR_SYMBOL","transformKeys","resolveValue","calculateProps","get","rules","guards","inheritedVariables","inlineVariables","normal","important","delayedStyles","transformStyles","rule","Object","assign","v","variable","d","topLevelTarget","s","Important","target","ruleTarget","path","applyDeclarations","delayedStyle","transformStyle","declarations","declaration","Array","isArray","value","propPath","prop","first","rest","final","pop","shouldDelay","has","originalValue","push","renderGuards"],"sourceRoot":"../../../../../src","sources":["runtime/native/styles/calculate-props.ts"],"mappings":";;AAAA;;AAMA,SAASA,UAAU,EAAEC,WAAW,EAAEC,WAAW,IAAIC,CAAC,QAAQ,sBAAa;AAEvE,SACEC,UAAU,QAGL,kBAAe;AACtB,SAASC,aAAa,QAAQ,eAAY;AAC1C,SAASC,YAAY,QAAQ,cAAW;AAExC,OAAO,SAASC,cAAcA,CAC5BC,GAAW,EACXC,KAA4D,EAC5DC,MAAqB,GAAG,EAAE,EAC1BC,kBAAwC,GAAG;EACzC,CAACP,UAAU,GAAG;AAChB,CAAC,EACDQ,eAA+B,GAAG;EAChC,CAACR,UAAU,GAAG;AAChB,CAAC,EACD;EACA,IAAIS,MAAuC;EAC3C,IAAIC,SAA0C;EAE9C,MAAMC,aAA6B,GAAG,EAAE;EACxC,MAAMC,eAA+B,GAAG,EAAE;EAE1C,KAAK,MAAMC,IAAI,IAAIR,KAAK,EAAE;IACxB,IAAIL,UAAU,IAAIa,IAAI,EAAE;MACtB,IAAI,OAAOA,IAAI,CAACb,UAAU,CAAC,KAAK,QAAQ,EAAE;QACxCc,MAAM,CAACC,MAAM,CAACP,eAAe,EAAEK,IAAI,CAAC;MACtC,CAAC,MAAM;QACLC,MAAM,CAACC,MAAM,CAACR,kBAAkB,EAAEM,IAAI,CAAC;MACzC;MACA;IACF;IAEA,IAAIA,IAAI,CAACG,CAAC,EAAE;MACV,KAAK,MAAMC,QAAQ,IAAIJ,IAAI,CAACG,CAAC,EAAE;QAC7BR,eAAe,CAACS,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAGA,QAAQ,CAAC,CAAC,CAAC;MAC5C;IACF;IAEA,IAAIJ,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MAAM;YACzBV,KAAK,GAAG9B,YAAY,CAACuC,aAAa,EAAErC,GAAG,EAAE;cACvCI,eAAe;cACfD,kBAAkB;cAClBoC,YAAY,EAAErC,MAAM;cACpBH;YACF,CAAC,CAAC;YACFP,UAAU,CAAC0B,MAAM,EAAEY,IAAI,EAAEF,KAAK,CAAC;UACjC,CAAC,CAAC;QACJ,CAAC,MAAM;UACLrB,aAAa,CAAC+B,IAAI,CAAC,MAAM;YACvB,IAAI7C,WAAW,CAACyB,MAAM,EAAEY,IAAI,CAAC,KAAKF,KAAK,EAAE;cACvC,OAAOV,MAAM,CAACY,IAAI,CAAC;cACnBF,KAAK,GAAG9B,YAAY,CAACuC,aAAa,EAAErC,GAAG,EAAE;gBACvCI,eAAe;gBACfD,kBAAkB;gBAClBoC,YAAY,EAAErC,MAAM;gBACpBH;cACF,CAAC,CAAC;cACFP,UAAU,CAAC0B,MAAM,EAAEY,IAAI,EAAEF,KAAK,CAAC;YACjC;UACF,CAAC,CAAC;QACJ;MACF,CAAC,MAAM;QACLA,KAAK,GAAG9B,YAAY,CAAC8B,KAAK,EAAE5B,GAAG,EAAE;UAC/BI,eAAe;UACfD,kBAAkB;UAClBoC,YAAY,EAAErC,MAAM;UACpBH;QACF,CAAC,CAAC;MACJ;MAEAP,UAAU,CAAC0B,MAAM,EAAEY,IAAI,EAAEF,KAAK,CAAC;IACjC;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["emVariableName","ShortHandSymbol","Symbol"],"sourceRoot":"../../../../../src","sources":["runtime/native/styles/constants.ts"],"mappings":";;AAAA,OAAO,MAAMA,cAAc,GAAG,aAAa;AAC3C,OAAO,MAAMC,eAAe,GAAGC,MAAM,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
export const transformKeys = new Set(["translate", "translateX", "translateY", "scale", "scaleX", "scaleY", "rotate", "rotateX", "rotateY", "rotateZ", "skewX", "skewY", "perspective", "matrix", "transformOrigin"]);
|
|
5
|
+
export const defaultValues = {
|
|
6
|
+
backgroundColor: "transparent",
|
|
7
|
+
borderBottomColor: "transparent",
|
|
8
|
+
borderBottomLeftRadius: 0,
|
|
9
|
+
borderBottomRightRadius: 0,
|
|
10
|
+
borderBottomWidth: 0,
|
|
11
|
+
borderColor: "transparent",
|
|
12
|
+
borderLeftColor: "transparent",
|
|
13
|
+
borderLeftWidth: 0,
|
|
14
|
+
borderRadius: 0,
|
|
15
|
+
borderRightColor: "transparent",
|
|
16
|
+
borderRightWidth: 0,
|
|
17
|
+
borderTopColor: "transparent",
|
|
18
|
+
borderTopWidth: 0,
|
|
19
|
+
borderWidth: 0,
|
|
20
|
+
bottom: 0,
|
|
21
|
+
color: "black",
|
|
22
|
+
flex: 1,
|
|
23
|
+
flexBasis: 1,
|
|
24
|
+
flexGrow: 1,
|
|
25
|
+
flexShrink: 0,
|
|
26
|
+
fontSize: 14,
|
|
27
|
+
fontWeight: "400",
|
|
28
|
+
gap: 0,
|
|
29
|
+
left: 0,
|
|
30
|
+
lineHeight: 14,
|
|
31
|
+
margin: 0,
|
|
32
|
+
marginBottom: 0,
|
|
33
|
+
marginLeft: 0,
|
|
34
|
+
marginRight: 0,
|
|
35
|
+
marginTop: 0,
|
|
36
|
+
maxHeight: 99999,
|
|
37
|
+
maxWidth: 99999,
|
|
38
|
+
minHeight: 0,
|
|
39
|
+
minWidth: 0,
|
|
40
|
+
opacity: 1,
|
|
41
|
+
padding: 0,
|
|
42
|
+
paddingBottom: 0,
|
|
43
|
+
paddingLeft: 0,
|
|
44
|
+
paddingRight: 0,
|
|
45
|
+
paddingTop: 0,
|
|
46
|
+
perspective: 1,
|
|
47
|
+
right: 0,
|
|
48
|
+
rotate: "0deg",
|
|
49
|
+
rotateX: "0deg",
|
|
50
|
+
rotateY: "0deg",
|
|
51
|
+
rotateZ: "0deg",
|
|
52
|
+
scale: 1,
|
|
53
|
+
scaleX: 1,
|
|
54
|
+
scaleY: 1,
|
|
55
|
+
skewX: "0deg",
|
|
56
|
+
skewY: "0deg",
|
|
57
|
+
textShadowRadius: 0,
|
|
58
|
+
top: 0,
|
|
59
|
+
transformOrigin: "50%",
|
|
60
|
+
translateX: 0,
|
|
61
|
+
translateY: 0,
|
|
62
|
+
width: 0,
|
|
63
|
+
zIndex: 0
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["transformKeys","Set","defaultValues","backgroundColor","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomWidth","borderColor","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderTopColor","borderTopWidth","borderWidth","bottom","color","flex","flexBasis","flexGrow","flexShrink","fontSize","fontWeight","gap","left","lineHeight","margin","marginBottom","marginLeft","marginRight","marginTop","maxHeight","maxWidth","minHeight","minWidth","opacity","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","perspective","right","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","skewX","skewY","textShadowRadius","top","transformOrigin","translateX","translateY","width","zIndex"],"sourceRoot":"../../../../../src","sources":["runtime/native/styles/defaults.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,aAAa,GAAG,IAAIC,GAAG,CAAC,CACnC,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,OAAO,EACP,OAAO,EACP,aAAa,EACb,QAAQ,EACR,iBAAiB,CAClB,CAAC;AAEF,OAAO,MAAMC,aAAkC,GAAG;EAChDC,eAAe,EAAE,aAAa;EAC9BC,iBAAiB,EAAE,aAAa;EAChCC,sBAAsB,EAAE,CAAC;EACzBC,uBAAuB,EAAE,CAAC;EAC1BC,iBAAiB,EAAE,CAAC;EAC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;EACbC,UAAU,EAAE,CAAC;EACbC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE;AACV,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
4
|
+
const advancedTimingFunctions = {
|
|
5
|
+
cubicBezier: () => {
|
|
6
|
+
return require("react-native-reanimated").cubicBezier;
|
|
7
|
+
},
|
|
8
|
+
steps: () => {
|
|
9
|
+
return require("react-native-reanimated").steps;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const timingFunctionResolver = (resolveValue, value) => {
|
|
13
|
+
const name = value[1];
|
|
14
|
+
const resolver = advancedTimingFunctions[name];
|
|
15
|
+
if (!resolver) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const args = resolveValue(value[2]);
|
|
19
|
+
if (!Array.isArray(args)) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const fn = resolver();
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
25
|
+
const result = fn(...args);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
export const cubicBezier = timingFunctionResolver;
|
|
29
|
+
export const steps = timingFunctionResolver;
|
|
30
|
+
//# sourceMappingURL=animation-timing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["advancedTimingFunctions","cubicBezier","require","steps","timingFunctionResolver","resolveValue","value","name","resolver","args","Array","isArray","fn","result"],"sourceRoot":"../../../../../../src","sources":["runtime/native/styles/functions/animation-timing.ts"],"mappings":";;AAEA;AACA,MAAMA,uBAIL,GAAG;EACFC,WAAW,EAAEA,CAAA,KAAM;IACjB,OACEC,OAAO,CAAC,yBAAyB,CAAC,CAClCD,WAAW;EACf,CAAC;EACDE,KAAK,EAAEA,CAAA,KAAM;IACX,OACED,OAAO,CAAC,yBAAyB,CAAC,CAClCC,KAAK;EACT;AACF,CAAC;AAED,MAAMC,sBAA6C,GAAGA,CAACC,YAAY,EAAEC,KAAK,KAAK;EAC7E,MAAMC,IAAI,GAAGD,KAAK,CAAC,CAAC,CAAC;EACrB,MAAME,QAAQ,GAAGR,uBAAuB,CAACO,IAAI,CAAC;EAE9C,IAAI,CAACC,QAAQ,EAAE;IACb;EACF;EAEA,MAAMC,IAAI,GAAGJ,YAAY,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC;EAEnC,IAAI,CAACI,KAAK,CAACC,OAAO,CAACF,IAAI,CAAC,EAAE;IACxB;EACF;EAEA,MAAMG,EAAE,GAAGJ,QAAQ,CAAC,CAAC;;EAErB;EACA,MAAMK,MAAM,GAAGD,EAAE,CAAC,GAAGH,IAAI,CAAC;EAE1B,OAAOI,MAAM;AACf,CAAC;AAED,OAAO,MAAMZ,WAAW,GAAGG,sBAAsB;AACjD,OAAO,MAAMD,KAAK,GAAGC,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const precedence = {
|
|
4
|
+
"+": 1,
|
|
5
|
+
"-": 1,
|
|
6
|
+
"*": 2,
|
|
7
|
+
"/": 2
|
|
8
|
+
};
|
|
9
|
+
export const calc = (resolveValue, func) => {
|
|
10
|
+
const tokens = resolveValue(func[2]);
|
|
11
|
+
if (!Array.isArray(tokens)) {
|
|
12
|
+
return tokens;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// --- Step 1: Convert to RPN (Shunting-Yard) ---
|
|
16
|
+
const output = [];
|
|
17
|
+
const ops = [];
|
|
18
|
+
for (const t of tokens) {
|
|
19
|
+
if (typeof t === "number") {
|
|
20
|
+
output.push({
|
|
21
|
+
value: round(t),
|
|
22
|
+
isPercent: false
|
|
23
|
+
});
|
|
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({
|
|
29
|
+
value: round(num / 100),
|
|
30
|
+
isPercent: true
|
|
31
|
+
});
|
|
32
|
+
} else if (t === "+" || t === "-" || t === "*" || t === "/") {
|
|
33
|
+
while (ops.length && (ops[ops.length - 1] === "+" || ops[ops.length - 1] === "-" || ops[ops.length - 1] === "*" || ops[ops.length - 1] === "/") &&
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
35
|
+
(precedence[ops[ops.length - 1]] ?? 0) >= (precedence[t] ?? 0)) {
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
|
+
output.push(ops.pop());
|
|
38
|
+
}
|
|
39
|
+
ops.push(t);
|
|
40
|
+
} else if (t === "(") {
|
|
41
|
+
ops.push(t);
|
|
42
|
+
} else if (t === ")") {
|
|
43
|
+
while (ops.length && ops[ops.length - 1] !== "(") {
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
45
|
+
output.push(ops.pop());
|
|
46
|
+
}
|
|
47
|
+
if (ops.pop() !== "(") return undefined; // mismatched parens
|
|
48
|
+
} else {
|
|
49
|
+
return undefined; // invalid token
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
while (ops.length) {
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
57
|
+
const op = ops.pop();
|
|
58
|
+
if (op === "(" || op === ")") return undefined;
|
|
59
|
+
output.push(op);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// --- Step 2: Evaluate RPN ---
|
|
63
|
+
const stack = [];
|
|
64
|
+
for (const t of output) {
|
|
65
|
+
if (typeof t !== "string") {
|
|
66
|
+
stack.push(t);
|
|
67
|
+
} else {
|
|
68
|
+
const b = stack.pop();
|
|
69
|
+
const a = stack.pop();
|
|
70
|
+
if (!a || !b) return undefined;
|
|
71
|
+
const res = {
|
|
72
|
+
value: 0,
|
|
73
|
+
isPercent: false
|
|
74
|
+
};
|
|
75
|
+
switch (t) {
|
|
76
|
+
case "+":
|
|
77
|
+
case "-":
|
|
78
|
+
{
|
|
79
|
+
if (a.isPercent !== b.isPercent) return undefined; // cannot mix
|
|
80
|
+
res.isPercent = a.isPercent;
|
|
81
|
+
res.value = t === "+" ? round(a.value + b.value) : round(a.value - b.value);
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case "*":
|
|
85
|
+
{
|
|
86
|
+
if (a.isPercent && b.isPercent) return undefined; // ambiguous
|
|
87
|
+
res.isPercent = a.isPercent || b.isPercent;
|
|
88
|
+
res.value = round(a.value * b.value);
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case "/":
|
|
92
|
+
{
|
|
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
|
+
if (stack.length !== 1) return undefined;
|
|
109
|
+
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
111
|
+
const final = stack[0];
|
|
112
|
+
if (final.isPercent) {
|
|
113
|
+
return `${final.value * 100}%`;
|
|
114
|
+
}
|
|
115
|
+
return final.value;
|
|
116
|
+
};
|
|
117
|
+
function round(number) {
|
|
118
|
+
return Math.round((number + Number.EPSILON) * 10000) / 10000;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=calc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["precedence","calc","resolveValue","func","tokens","Array","isArray","output","ops","t","push","value","round","isPercent","endsWith","num","parseFloat","slice","Number","isNaN","undefined","length","pop","op","stack","b","a","res","final","number","Math","EPSILON"],"sourceRoot":"../../../../../../src","sources":["runtime/native/styles/functions/calc.ts"],"mappings":";;AAOA,MAAMA,UAAkC,GAAG;EAAE,GAAG,EAAE,CAAC;EAAE,GAAG,EAAE,CAAC;EAAE,GAAG,EAAE,CAAC;EAAE,GAAG,EAAE;AAAE,CAAC;AAE7E,OAAO,MAAMC,IAA2B,GAAGA,CAACC,YAAY,EAAEC,IAAI,KAAK;EACjE,MAAMC,MAAM,GAAGF,YAAY,CAACC,IAAI,CAAC,CAAC,CAAC,CAAC;EAEpC,IAAI,CAACE,KAAK,CAACC,OAAO,CAACF,MAAM,CAAC,EAAE;IAC1B,OAAOA,MAAM;EACf;;EAEA;EACA,MAAMG,MAA0B,GAAG,EAAE;EACrC,MAAMC,GAAa,GAAG,EAAE;EAExB,KAAK,MAAMC,CAAC,IAAIL,MAAM,EAAE;IACtB,IAAI,OAAOK,CAAC,KAAK,QAAQ,EAAE;MACzBF,MAAM,CAACG,IAAI,CAAC;QAAEC,KAAK,EAAEC,KAAK,CAACH,CAAC,CAAC;QAAEI,SAAS,EAAE;MAAM,CAAC,CAAC;IACpD,CAAC,MAAM,IAAI,OAAOJ,CAAC,KAAK,QAAQ,EAAE;MAChC,IAAIA,CAAC,CAACK,QAAQ,CAAC,GAAG,CAAC,EAAE;QACnB,MAAMC,GAAG,GAAGC,UAAU,CAACP,CAAC,CAACQ,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACtC,IAAIC,MAAM,CAACC,KAAK,CAACJ,GAAG,CAAC,EAAE,OAAOK,SAAS;QACvCb,MAAM,CAACG,IAAI,CAAC;UAAEC,KAAK,EAAEC,KAAK,CAACG,GAAG,GAAG,GAAG,CAAC;UAAEF,SAAS,EAAE;QAAK,CAAC,CAAC;MAC3D,C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