react-native-css 2.1.1 → 3.0.0-nightly.27bd5e2
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 +101 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -0
- package/dist/commonjs/compiler/attributes.test.js +20 -0
- package/dist/commonjs/compiler/attributes.test.js.map +1 -0
- package/dist/commonjs/compiler/compiler.js +235 -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 +2088 -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/selectors.js +410 -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 +374 -0
- package/dist/commonjs/compiler/stylesheet.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/View.js +17 -0
- package/dist/commonjs/components/View.js.map +1 -0
- package/dist/commonjs/components/index.js +36 -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 +50 -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 +165 -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 +36 -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/container-query.js +116 -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 +74 -0
- package/dist/commonjs/runtime/native/conditions/index.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js +93 -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 +98 -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 +253 -0
- package/dist/commonjs/runtime/native/react/rules.js.map +1 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js +158 -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/styles/animation.js +88 -0
- package/dist/commonjs/runtime/native/styles/animation.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/border.js +12 -0
- package/dist/commonjs/runtime/native/styles/border.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js +40 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calc.js +85 -0
- package/dist/commonjs/runtime/native/styles/calc.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js +123 -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/filters.js +84 -0
- package/dist/commonjs/runtime/native/styles/filters.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/platform-functions.js +46 -0
- package/dist/commonjs/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +129 -0
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthand.js +79 -0
- package/dist/commonjs/runtime/native/styles/shorthand.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/text-shadow.js +13 -0
- package/dist/commonjs/runtime/native/styles/text-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/transform.js +23 -0
- package/dist/commonjs/runtime/native/styles/transform.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/units.js +49 -0
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/variables.js +78 -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 +84 -0
- package/dist/commonjs/runtime/utils/objects.js.map +1 -0
- package/dist/commonjs/runtime/utils/specificity.js +43 -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 +97 -0
- package/dist/module/compiler/atRules.js.map +1 -0
- package/dist/module/compiler/attributes.test.js +20 -0
- package/dist/module/compiler/attributes.test.js.map +1 -0
- package/dist/module/compiler/compiler.js +230 -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 +2014 -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/selectors.js +405 -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 +369 -0
- package/dist/module/compiler/stylesheet.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/View.js +12 -0
- package/dist/module/components/View.js.map +1 -0
- package/dist/module/components/index.js +6 -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 +29 -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 +159 -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 +34 -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/container-query.js +110 -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 +70 -0
- package/dist/module/runtime/native/conditions/index.js.map +1 -0
- package/dist/module/runtime/native/conditions/media-query.js +88 -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 +93 -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 +246 -0
- package/dist/module/runtime/native/react/rules.js.map +1 -0
- package/dist/module/runtime/native/react/useNativeCss.js +152 -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/styles/animation.js +82 -0
- package/dist/module/runtime/native/styles/animation.js.map +1 -0
- package/dist/module/runtime/native/styles/border.js +8 -0
- package/dist/module/runtime/native/styles/border.js.map +1 -0
- package/dist/module/runtime/native/styles/box-shadow.js +35 -0
- package/dist/module/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/calc.js +79 -0
- package/dist/module/runtime/native/styles/calc.js.map +1 -0
- package/dist/module/runtime/native/styles/calculate-props.js +118 -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/filters.js +70 -0
- package/dist/module/runtime/native/styles/filters.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/platform-functions.js +36 -0
- package/dist/module/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +125 -0
- package/dist/module/runtime/native/styles/resolve.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthand.js +74 -0
- package/dist/module/runtime/native/styles/shorthand.js.map +1 -0
- package/dist/module/runtime/native/styles/text-shadow.js +9 -0
- package/dist/module/runtime/native/styles/text-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/transform.js +18 -0
- package/dist/module/runtime/native/styles/transform.js.map +1 -0
- package/dist/module/runtime/native/styles/units.js +40 -0
- package/dist/module/runtime/native/styles/units.js.map +1 -0
- package/dist/module/runtime/native/styles/variables.js +74 -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 +76 -0
- package/dist/module/runtime/utils/objects.js.map +1 -0
- package/dist/module/runtime/utils/specificity.js +38 -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/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/attributes.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +10 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +198 -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 +121 -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/selectors.d.ts +23 -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 +50 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.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/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 +4 -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 +14 -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/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 +37 -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 +63 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +9 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.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/filters.d.ts +12 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts +11 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/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 +12 -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/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/attributes.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts +10 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +198 -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 +121 -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/selectors.d.ts +23 -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 +50 -0
- package/dist/typescript/module/src/compiler/stylesheet.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/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 +4 -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 +14 -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/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 +37 -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 +63 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +9 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/calc.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/filters.d.ts +12 -0
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts +11 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/styles/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 +12 -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 +222 -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 +144 -0
- package/src/compiler/attributes.test.ts +28 -0
- package/src/compiler/compiler.ts +268 -0
- package/src/compiler/compiler.types.ts +267 -0
- package/src/compiler/container-query.ts +97 -0
- package/src/compiler/declarations.ts +2964 -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/selectors.ts +491 -0
- package/src/compiler/split-by-delimiter.ts +19 -0
- package/src/compiler/stylesheet.ts +528 -0
- package/src/components/Text.tsx +17 -0
- package/src/components/View.tsx +17 -0
- package/src/components/index.tsx +4 -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 +42 -0
- package/src/jest/setup.ts +1 -0
- package/src/jest/setupAfterEnv.ts +13 -0
- package/src/metro/index.ts +231 -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 +32 -0
- package/src/runtime/index.ts +7 -0
- package/src/runtime/native/api.ts +106 -0
- package/src/runtime/native/conditions/container-query.ts +157 -0
- package/src/runtime/native/conditions/guards.ts +45 -0
- package/src/runtime/native/conditions/index.ts +106 -0
- package/src/runtime/native/conditions/media-query.ts +94 -0
- package/src/runtime/native/index.ts +4 -0
- package/src/runtime/native/injection.ts +131 -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 +326 -0
- package/src/runtime/native/react/useNativeCss.ts +200 -0
- package/src/runtime/native/react/usePassthrough.ts +51 -0
- package/src/runtime/native/reactivity.ts +262 -0
- package/src/runtime/native/styles/animation.ts +181 -0
- package/src/runtime/native/styles/border.ts +10 -0
- package/src/runtime/native/styles/box-shadow.ts +54 -0
- package/src/runtime/native/styles/calc.ts +97 -0
- package/src/runtime/native/styles/calculate-props.ts +165 -0
- package/src/runtime/native/styles/constants.ts +2 -0
- package/src/runtime/native/styles/defaults.ts +78 -0
- package/src/runtime/native/styles/filters.ts +98 -0
- package/src/runtime/native/styles/index.ts +197 -0
- package/src/runtime/native/styles/platform-functions.ts +50 -0
- package/src/runtime/native/styles/resolve.ts +205 -0
- package/src/runtime/native/styles/shorthand.ts +121 -0
- package/src/runtime/native/styles/text-shadow.ts +17 -0
- package/src/runtime/native/styles/transform.ts +21 -0
- package/src/runtime/native/styles/units.ts +53 -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 +97 -0
- package/src/runtime/utils/specificity.ts +44 -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/.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,262 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { createContext } from "react";
|
|
3
|
+
import {
|
|
4
|
+
Appearance,
|
|
5
|
+
Dimensions,
|
|
6
|
+
type ColorSchemeName,
|
|
7
|
+
type LayoutRectangle,
|
|
8
|
+
} from "react-native";
|
|
9
|
+
|
|
10
|
+
import type { LightDarkVariable, StyleDescriptor } from "../../compiler";
|
|
11
|
+
|
|
12
|
+
export type Effect = {
|
|
13
|
+
observers: Set<Effect>;
|
|
14
|
+
run(): void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type Observable<Value, Arg = Value> = {
|
|
18
|
+
observers: Set<Effect>;
|
|
19
|
+
get: (effect?: Effect) => Value;
|
|
20
|
+
set: (arg: Arg) => void;
|
|
21
|
+
run: () => void;
|
|
22
|
+
};
|
|
23
|
+
type Read<Value, Arg> = (get: Getter, arg?: Arg) => Value;
|
|
24
|
+
export type Getter = <Value>(observable: Observable<Value, any>) => Value;
|
|
25
|
+
|
|
26
|
+
export const observableBatch: {
|
|
27
|
+
current?: Set<Effect>;
|
|
28
|
+
} = {};
|
|
29
|
+
|
|
30
|
+
export function observable<Value, Arg = Value>(
|
|
31
|
+
init: Value | Read<Value, Arg>,
|
|
32
|
+
equality: (value1: Value, value2: Value) => boolean = Object.is,
|
|
33
|
+
) {
|
|
34
|
+
let value: Value;
|
|
35
|
+
let isStatic = typeof init !== "function";
|
|
36
|
+
let didInit: boolean | undefined;
|
|
37
|
+
let lastArg: Arg | undefined;
|
|
38
|
+
|
|
39
|
+
if (typeof init !== "function") {
|
|
40
|
+
value = init;
|
|
41
|
+
didInit = true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const observers = new Set<Effect>();
|
|
45
|
+
const effect: Effect = {
|
|
46
|
+
observers,
|
|
47
|
+
run: () => {
|
|
48
|
+
if (!isStatic) {
|
|
49
|
+
const nextValue = (init as Read<Value, Arg>)(getter, lastArg);
|
|
50
|
+
if (equality(value, nextValue)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
value = nextValue;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
notify();
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const getter: Getter = (observable) => observable.get(effect);
|
|
61
|
+
|
|
62
|
+
function get(effect?: Effect) {
|
|
63
|
+
if (effect) {
|
|
64
|
+
observers.add(effect);
|
|
65
|
+
}
|
|
66
|
+
if (!didInit) {
|
|
67
|
+
value = (init as Read<Value, Arg>)(getter, undefined);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function set(arg: Arg) {
|
|
74
|
+
if (isStatic) {
|
|
75
|
+
if (equality(value, arg as unknown as Value)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
value = arg as unknown as Value;
|
|
79
|
+
} else {
|
|
80
|
+
const nextValue = (init as Read<Value, Arg>)(getter, arg);
|
|
81
|
+
|
|
82
|
+
didInit = true;
|
|
83
|
+
lastArg = arg;
|
|
84
|
+
|
|
85
|
+
if (equality(value, nextValue)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
value = nextValue;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
notify();
|
|
92
|
+
|
|
93
|
+
return obs;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function notify() {
|
|
97
|
+
Array.from(observers).forEach((observer) => {
|
|
98
|
+
if (observableBatch.current) {
|
|
99
|
+
observableBatch.current.add(observer);
|
|
100
|
+
} else {
|
|
101
|
+
observer.run();
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const obs: Observable<Value, Arg> = {
|
|
107
|
+
observers,
|
|
108
|
+
get,
|
|
109
|
+
set,
|
|
110
|
+
run: effect.run,
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return obs;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function cleanupEffect(effect: Effect) {
|
|
117
|
+
if (!effect) return;
|
|
118
|
+
for (const dep of effect.observers) {
|
|
119
|
+
dep.observers.delete(effect);
|
|
120
|
+
}
|
|
121
|
+
effect.observers.clear();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Family Helpers ************************************************************/
|
|
125
|
+
|
|
126
|
+
export function family<Key, Result = Key, Args extends any = void>(
|
|
127
|
+
fn: (key: Key, args: Args) => Result,
|
|
128
|
+
) {
|
|
129
|
+
const map = new Map<Key, Result>();
|
|
130
|
+
return Object.assign(
|
|
131
|
+
(key: Key, args: Args) => {
|
|
132
|
+
let value = map.get(key);
|
|
133
|
+
if (!value) {
|
|
134
|
+
value = fn(key, args);
|
|
135
|
+
map.set(key, value);
|
|
136
|
+
}
|
|
137
|
+
return value;
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
delete(key: Key) {
|
|
141
|
+
return map.delete(key);
|
|
142
|
+
},
|
|
143
|
+
clear() {
|
|
144
|
+
return map.clear();
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
type WeakFamilyFn<Key, Args = undefined, Result = Key> = ((
|
|
151
|
+
key: Key,
|
|
152
|
+
args: Args,
|
|
153
|
+
) => Result) & {
|
|
154
|
+
has(key: Key): boolean;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export function weakFamily<Key extends WeakKey, Result = Key>(
|
|
158
|
+
fn: (key: Key) => Result,
|
|
159
|
+
): WeakFamilyFn<Key, void, Result>;
|
|
160
|
+
export function weakFamily<Key extends WeakKey, Args = undefined, Result = Key>(
|
|
161
|
+
fn: (key: Key, args: Args) => Result,
|
|
162
|
+
): WeakFamilyFn<Key, Args, Result>;
|
|
163
|
+
export function weakFamily<Key extends WeakKey, Args = undefined, Result = Key>(
|
|
164
|
+
fn: (key: Key, args: Args) => Result,
|
|
165
|
+
): WeakFamilyFn<Key, Args, Result> {
|
|
166
|
+
const map = new WeakMap<Key, Result>();
|
|
167
|
+
return Object.assign(
|
|
168
|
+
(key: Key, args: Args) => {
|
|
169
|
+
let value = map.get(key);
|
|
170
|
+
if (!value) {
|
|
171
|
+
value = fn(key, args);
|
|
172
|
+
map.set(key, value);
|
|
173
|
+
}
|
|
174
|
+
return value;
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
has: (key: Key) => map.has(key),
|
|
178
|
+
},
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/********************************* Variables **********************************/
|
|
183
|
+
|
|
184
|
+
export const VAR_SYMBOL = Symbol("react-native-css.var");
|
|
185
|
+
export type VariableContextValue = Record<string, StyleDescriptor> & {
|
|
186
|
+
[VAR_SYMBOL]: true;
|
|
187
|
+
};
|
|
188
|
+
export const VariableContext = createContext<VariableContextValue>({
|
|
189
|
+
[VAR_SYMBOL]: true,
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
const lightDarkFamily = () => {
|
|
193
|
+
return family<string, Observable<StyleDescriptor, LightDarkVariable>>(() => {
|
|
194
|
+
const obs = observable<StyleDescriptor, LightDarkVariable>(
|
|
195
|
+
(read, lightDark = [undefined, undefined]) => {
|
|
196
|
+
const colorSchemeName =
|
|
197
|
+
read(colorScheme) ?? Appearance.getColorScheme() ?? "light";
|
|
198
|
+
|
|
199
|
+
return colorSchemeName === "dark"
|
|
200
|
+
? (lightDark[1] ?? lightDark[0])
|
|
201
|
+
: lightDark[0];
|
|
202
|
+
},
|
|
203
|
+
);
|
|
204
|
+
|
|
205
|
+
return obs;
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
export const rootVariables = lightDarkFamily();
|
|
209
|
+
export const universalVariables = lightDarkFamily();
|
|
210
|
+
|
|
211
|
+
/** Units *********************************************************************/
|
|
212
|
+
|
|
213
|
+
export const rem = observable(14);
|
|
214
|
+
|
|
215
|
+
/** Pseudo Classes ************************************************************/
|
|
216
|
+
|
|
217
|
+
export const hoverFamily = weakFamily(() => observable(false));
|
|
218
|
+
export const activeFamily = weakFamily(() => observable<boolean>(false));
|
|
219
|
+
export const focusFamily = weakFamily(() => observable<boolean>(false));
|
|
220
|
+
|
|
221
|
+
/** Dimensions ****************************************************************/
|
|
222
|
+
|
|
223
|
+
export const dimensions = observable(Dimensions.get("window"));
|
|
224
|
+
export const vw = observable<number>(
|
|
225
|
+
(read, value) => value ?? read(dimensions)?.width,
|
|
226
|
+
);
|
|
227
|
+
export const vh = observable<number>(
|
|
228
|
+
(read, value) => value ?? read(dimensions)?.height,
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
/** Color Scheme **************************************************************/
|
|
232
|
+
|
|
233
|
+
export const colorScheme = observable<ColorSchemeName>(
|
|
234
|
+
Appearance.getColorScheme(),
|
|
235
|
+
);
|
|
236
|
+
Appearance.addChangeListener((event) => colorScheme.set(event.colorScheme));
|
|
237
|
+
|
|
238
|
+
/** Containers ****************************************************************/
|
|
239
|
+
|
|
240
|
+
export type ContainerContextValue = Record<string, Effect>;
|
|
241
|
+
export const ContainerContext = createContext<ContainerContextValue>({});
|
|
242
|
+
|
|
243
|
+
export const containerLayoutFamily = weakFamily(() => {
|
|
244
|
+
return observable<LayoutRectangle>({
|
|
245
|
+
x: 0,
|
|
246
|
+
y: 0,
|
|
247
|
+
width: 0,
|
|
248
|
+
height: 0,
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
export const containerWidthFamily = weakFamily((key) => {
|
|
253
|
+
return observable((read) => {
|
|
254
|
+
return read(containerLayoutFamily(key))?.width || 0;
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
export const containerHeightFamily = weakFamily((key) => {
|
|
259
|
+
return observable((read) => {
|
|
260
|
+
return read(containerLayoutFamily(key))?.width || 0;
|
|
261
|
+
});
|
|
262
|
+
});
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ComponentType } from "react";
|
|
3
|
+
|
|
4
|
+
import { applyShorthand } from "../../utils";
|
|
5
|
+
import { StyleCollection } from "../injection";
|
|
6
|
+
import { weakFamily } from "../reactivity";
|
|
7
|
+
import type { StyleFunctionResolver } from "./resolve";
|
|
8
|
+
import { shorthandHandler } from "./shorthand";
|
|
9
|
+
|
|
10
|
+
const name = ["animationName", "string", "none"] as const;
|
|
11
|
+
const delay = ["animationDelay", "number", 0] as const;
|
|
12
|
+
const duration = ["animationDuration", "number", 0] as const;
|
|
13
|
+
const iteration = [
|
|
14
|
+
"animationIterationCount",
|
|
15
|
+
["number", "infinite"],
|
|
16
|
+
1,
|
|
17
|
+
] as const;
|
|
18
|
+
const fill = [
|
|
19
|
+
"animationFillMode",
|
|
20
|
+
["none", "forwards", "backwards", "both"],
|
|
21
|
+
"none",
|
|
22
|
+
] as const;
|
|
23
|
+
const playState = [
|
|
24
|
+
"animationPlayState",
|
|
25
|
+
["running", "paused"],
|
|
26
|
+
"running",
|
|
27
|
+
] as const;
|
|
28
|
+
const direction = [
|
|
29
|
+
"animationDirection",
|
|
30
|
+
["normal", "reverse", "alternate", "alternate-reverse"],
|
|
31
|
+
"normal",
|
|
32
|
+
] as const;
|
|
33
|
+
const timingFunction = [
|
|
34
|
+
"animationTimingFunction",
|
|
35
|
+
["linear", "ease", "ease-in", "ease-out", "ease-in-out", "object"],
|
|
36
|
+
"ease",
|
|
37
|
+
] as const;
|
|
38
|
+
|
|
39
|
+
export const animationShorthand = shorthandHandler(
|
|
40
|
+
[
|
|
41
|
+
[name],
|
|
42
|
+
[duration, name],
|
|
43
|
+
[name, duration],
|
|
44
|
+
[name, duration, iteration],
|
|
45
|
+
[name, duration, timingFunction, iteration],
|
|
46
|
+
[duration, delay, name],
|
|
47
|
+
[duration, delay, iteration, name],
|
|
48
|
+
[duration, delay, iteration, timingFunction, name],
|
|
49
|
+
[name, duration, timingFunction, delay, iteration, fill],
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
name,
|
|
53
|
+
delay,
|
|
54
|
+
direction,
|
|
55
|
+
duration,
|
|
56
|
+
fill,
|
|
57
|
+
iteration,
|
|
58
|
+
playState,
|
|
59
|
+
timingFunction,
|
|
60
|
+
],
|
|
61
|
+
"tuples",
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
export const animatedComponentFamily = weakFamily(
|
|
65
|
+
(component: ComponentType) => {
|
|
66
|
+
if (
|
|
67
|
+
"displayName" in component &&
|
|
68
|
+
component.displayName?.startsWith("Animated.")
|
|
69
|
+
) {
|
|
70
|
+
return component;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const createAnimatedComponent =
|
|
74
|
+
require("react-native-reanimated").createAnimatedComponent;
|
|
75
|
+
|
|
76
|
+
return createAnimatedComponent(component);
|
|
77
|
+
},
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
export const animation: StyleFunctionResolver = (
|
|
81
|
+
resolveValue,
|
|
82
|
+
value,
|
|
83
|
+
get,
|
|
84
|
+
options,
|
|
85
|
+
) => {
|
|
86
|
+
const animationShortHandTuples = animationShorthand(
|
|
87
|
+
resolveValue,
|
|
88
|
+
value,
|
|
89
|
+
get,
|
|
90
|
+
options,
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
if (!Array.isArray(animationShortHandTuples)) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
animationShortHandTuples.pop();
|
|
98
|
+
|
|
99
|
+
const nameTuple = animationShortHandTuples.find(
|
|
100
|
+
(tuple) => tuple[1] === "animationName",
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const name = nameTuple?.[0];
|
|
104
|
+
|
|
105
|
+
if (!nameTuple || typeof name !== "string") {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const keyframes = get(StyleCollection.keyframes(name));
|
|
110
|
+
|
|
111
|
+
const animation: Record<string, any> = {};
|
|
112
|
+
for (const [progress, declarations] of keyframes) {
|
|
113
|
+
animation[progress] ??= {};
|
|
114
|
+
|
|
115
|
+
const props = options.calculateProps?.(
|
|
116
|
+
get,
|
|
117
|
+
// Cast this into a StyleRule[]
|
|
118
|
+
[{ s: [0], d: declarations }],
|
|
119
|
+
options.renderGuards,
|
|
120
|
+
options.inheritedVariables,
|
|
121
|
+
options.inlineVariables,
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
if (!props) {
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (props.normal) {
|
|
129
|
+
Object.assign(animation[progress], props.normal);
|
|
130
|
+
}
|
|
131
|
+
if (props.important) {
|
|
132
|
+
Object.assign(animation[progress], props.important);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
animation[progress] = animation[progress].style;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
nameTuple[0] = animation;
|
|
139
|
+
|
|
140
|
+
return applyShorthand(animationShortHandTuples);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const advancedTimingFunctions: Record<
|
|
144
|
+
string,
|
|
145
|
+
() => (...args: any[]) => unknown
|
|
146
|
+
> = {
|
|
147
|
+
"cubic-bezier": () => {
|
|
148
|
+
return (
|
|
149
|
+
require("react-native-reanimated") as typeof import("react-native-reanimated")
|
|
150
|
+
).cubicBezier;
|
|
151
|
+
},
|
|
152
|
+
"steps": () => {
|
|
153
|
+
return (
|
|
154
|
+
require("react-native-reanimated") as typeof import("react-native-reanimated")
|
|
155
|
+
).steps;
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
export const timingFunctionResolver: StyleFunctionResolver = (
|
|
160
|
+
resolveValue,
|
|
161
|
+
value,
|
|
162
|
+
) => {
|
|
163
|
+
const name = value[1];
|
|
164
|
+
const resolver = advancedTimingFunctions[name];
|
|
165
|
+
|
|
166
|
+
if (!resolver) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const args = resolveValue(value[2]);
|
|
171
|
+
|
|
172
|
+
if (!Array.isArray(args)) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const fn = resolver();
|
|
177
|
+
|
|
178
|
+
const result = fn(...args);
|
|
179
|
+
|
|
180
|
+
return result;
|
|
181
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { shorthandHandler } from "./shorthand";
|
|
2
|
+
|
|
3
|
+
const width = ["borderWidth", "number"] as const;
|
|
4
|
+
const style = ["borderStyle", "string"] as const;
|
|
5
|
+
const color = ["borderColor", "color", "color"] as const;
|
|
6
|
+
|
|
7
|
+
export const border = shorthandHandler(
|
|
8
|
+
[[width, style, color], [style, color], [width, style], [style]],
|
|
9
|
+
[],
|
|
10
|
+
);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { isStyleDescriptorArray } from "../../utils";
|
|
2
|
+
import type { StyleFunctionResolver } from "./resolve";
|
|
3
|
+
import { shorthandHandler } from "./shorthand";
|
|
4
|
+
|
|
5
|
+
const color = ["color", "string"] as const;
|
|
6
|
+
const offsetX = ["offsetX", "number"] as const;
|
|
7
|
+
const offsetY = ["offsetY", "number"] as const;
|
|
8
|
+
const blurRadius = ["blurRadius", "number"] as const;
|
|
9
|
+
const spreadDistance = ["spreadDistance", "number"] as const;
|
|
10
|
+
// const inset = ["inset", "string"] as const;
|
|
11
|
+
|
|
12
|
+
const handler = shorthandHandler(
|
|
13
|
+
[
|
|
14
|
+
[offsetX, offsetY, blurRadius, spreadDistance, color],
|
|
15
|
+
[color, offsetX, offsetY],
|
|
16
|
+
[color, offsetX, offsetY, blurRadius],
|
|
17
|
+
[color, offsetX, offsetY, blurRadius, spreadDistance],
|
|
18
|
+
[offsetX, offsetY, color],
|
|
19
|
+
[offsetX, offsetY, blurRadius, color],
|
|
20
|
+
],
|
|
21
|
+
[],
|
|
22
|
+
"object",
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export const boxShadow: StyleFunctionResolver = (
|
|
26
|
+
resolveValue,
|
|
27
|
+
func,
|
|
28
|
+
get,
|
|
29
|
+
options,
|
|
30
|
+
) => {
|
|
31
|
+
const args = resolveValue(func[2]);
|
|
32
|
+
|
|
33
|
+
if (!isStyleDescriptorArray(args)) {
|
|
34
|
+
return args;
|
|
35
|
+
} else {
|
|
36
|
+
return args.flatMap((shadows) => {
|
|
37
|
+
if (shadows === undefined) {
|
|
38
|
+
return [];
|
|
39
|
+
} else if (isStyleDescriptorArray(shadows)) {
|
|
40
|
+
if (shadows.length === 0) {
|
|
41
|
+
return [];
|
|
42
|
+
} else if (Array.isArray(shadows[0])) {
|
|
43
|
+
return shadows
|
|
44
|
+
.map((shadow) => handler(resolveValue, shadow, get, options))
|
|
45
|
+
.filter((v) => v !== undefined);
|
|
46
|
+
} else {
|
|
47
|
+
return handler(resolveValue, shadows, get, options);
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
return handler(resolveValue, shadows, get, options);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { isStyleDescriptorArray } from "../../utils";
|
|
3
|
+
import type { StyleFunctionResolver } from "./resolve";
|
|
4
|
+
|
|
5
|
+
const calcPrecedence: Record<string, number> = {
|
|
6
|
+
"+": 1,
|
|
7
|
+
"-": 1,
|
|
8
|
+
"*": 2,
|
|
9
|
+
"/": 2,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const calc: StyleFunctionResolver = (resolveValue, func) => {
|
|
13
|
+
let mode: "number" | "percentage" | undefined;
|
|
14
|
+
const values: number[] = [];
|
|
15
|
+
const ops: string[] = [];
|
|
16
|
+
|
|
17
|
+
const args = resolveValue(func[2]);
|
|
18
|
+
|
|
19
|
+
if (!isStyleDescriptorArray(args)) return;
|
|
20
|
+
|
|
21
|
+
for (let token of args) {
|
|
22
|
+
if (typeof token === "number") {
|
|
23
|
+
if (!mode) mode = "number";
|
|
24
|
+
if (mode !== "number") return;
|
|
25
|
+
values.push(token);
|
|
26
|
+
continue;
|
|
27
|
+
} else if (typeof token === "string") {
|
|
28
|
+
if (token === "(") {
|
|
29
|
+
ops.push(token);
|
|
30
|
+
} else if (token === ")") {
|
|
31
|
+
// Resolve all values within the brackets
|
|
32
|
+
while (ops.length && ops[ops.length - 1] !== "(") {
|
|
33
|
+
applyCalcOperator(ops.pop()!, values.pop(), values.pop(), values);
|
|
34
|
+
}
|
|
35
|
+
ops.pop();
|
|
36
|
+
} else if (token.endsWith("%")) {
|
|
37
|
+
if (!mode) mode = "percentage";
|
|
38
|
+
if (mode !== "percentage") return;
|
|
39
|
+
values.push(Number.parseFloat(token.slice(0, -1)));
|
|
40
|
+
} else {
|
|
41
|
+
// This means we have an operator
|
|
42
|
+
while (
|
|
43
|
+
ops.length &&
|
|
44
|
+
ops[ops.length - 1] &&
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
calcPrecedence[ops[ops.length - 1]] >= calcPrecedence[token]
|
|
47
|
+
) {
|
|
48
|
+
applyCalcOperator(ops.pop()!, values.pop(), values.pop(), values);
|
|
49
|
+
}
|
|
50
|
+
ops.push(token);
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
// We got something unexpected
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
while (ops.length) {
|
|
59
|
+
applyCalcOperator(ops.pop()!, values.pop(), values.pop(), values);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (!mode) return;
|
|
63
|
+
|
|
64
|
+
const num = values[0];
|
|
65
|
+
|
|
66
|
+
if (typeof num !== "number") {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const value = Math.round((num + Number.EPSILON) * 100) / 100;
|
|
71
|
+
|
|
72
|
+
if (mode === "percentage") {
|
|
73
|
+
return `${value}%`;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return value;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
function applyCalcOperator(
|
|
80
|
+
operator: string,
|
|
81
|
+
b = 0, // These are reversed because we pop them off the stack
|
|
82
|
+
a = 0,
|
|
83
|
+
values: number[],
|
|
84
|
+
) {
|
|
85
|
+
switch (operator) {
|
|
86
|
+
case "+":
|
|
87
|
+
return values.push(a + b);
|
|
88
|
+
case "-":
|
|
89
|
+
return values.push(a - b);
|
|
90
|
+
case "*":
|
|
91
|
+
return values.push(a * b);
|
|
92
|
+
case "/":
|
|
93
|
+
return values.push(a / b);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return;
|
|
97
|
+
}
|