react-native-css 2.1.2 → 3.0.0-nightly.26b272f
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 +274 -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 +2167 -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/selector-builder.js +457 -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 +459 -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 +49 -0
- package/dist/commonjs/jest/index.js.map +1 -0
- package/dist/commonjs/jest/setup.js +3 -0
- package/dist/commonjs/jest/setup.js.map +1 -0
- package/dist/commonjs/jest/setupAfterEnv.js +15 -0
- package/dist/commonjs/jest/setupAfterEnv.js.map +1 -0
- package/dist/commonjs/metro/index.js +167 -0
- package/dist/commonjs/metro/index.js.map +1 -0
- package/dist/commonjs/metro/injection-code.js +32 -0
- package/dist/commonjs/metro/injection-code.js.map +1 -0
- package/dist/commonjs/metro/metro-transformer.js +21 -0
- package/dist/commonjs/metro/metro-transformer.js.map +1 -0
- package/dist/commonjs/metro/picocolors.js +71 -0
- package/dist/commonjs/metro/picocolors.js.map +1 -0
- package/dist/commonjs/metro/resolver.js +62 -0
- package/dist/commonjs/metro/resolver.js.map +1 -0
- package/dist/commonjs/metro/stringify.js +59 -0
- package/dist/commonjs/metro/stringify.js.map +1 -0
- package/dist/commonjs/metro/typescript.js +47 -0
- package/dist/commonjs/metro/typescript.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/poison.pill.js +39 -0
- package/dist/commonjs/poison.pill.js.map +1 -0
- package/dist/commonjs/runtime/index.js +17 -0
- package/dist/commonjs/runtime/index.js.map +1 -0
- package/dist/commonjs/runtime/native/api.js +90 -0
- package/dist/commonjs/runtime/native/api.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
- package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js +123 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/guards.js +33 -0
- package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/index.js +38 -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 +99 -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 +159 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js +50 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/commonjs/runtime/native/reactivity.js +178 -0
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -0
- package/dist/commonjs/runtime/native/root.js +28 -0
- package/dist/commonjs/runtime/native/root.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 +128 -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 +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 +84 -0
- package/dist/commonjs/runtime/utils/objects.js.map +1 -0
- package/dist/commonjs/runtime/utils/specificity.js +44 -0
- package/dist/commonjs/runtime/utils/specificity.js.map +1 -0
- package/dist/commonjs/runtime/utils/style-value.js +21 -0
- package/dist/commonjs/runtime/utils/style-value.js.map +1 -0
- package/dist/commonjs/runtime/utils/utils.types.js +6 -0
- package/dist/commonjs/runtime/utils/utils.types.js.map +1 -0
- package/dist/commonjs/runtime/web/api.js +68 -0
- package/dist/commonjs/runtime/web/api.js.map +1 -0
- package/dist/commonjs/runtime/web/assign-style.js +27 -0
- package/dist/commonjs/runtime/web/assign-style.js.map +1 -0
- package/dist/commonjs/runtime/web/index.js +18 -0
- package/dist/commonjs/runtime/web/index.js.map +1 -0
- package/dist/commonjs/runtime/web/metro.js +6 -0
- package/dist/commonjs/runtime/web/metro.js.map +1 -0
- package/dist/module/babel/allowedModules.js +19 -0
- package/dist/module/babel/allowedModules.js.map +1 -0
- package/dist/module/babel/helpers.js +21 -0
- package/dist/module/babel/helpers.js.map +1 -0
- package/dist/module/babel/import-plugin.js +97 -0
- package/dist/module/babel/import-plugin.js.map +1 -0
- package/dist/module/babel/index.js +9 -0
- package/dist/module/babel/index.js.map +1 -0
- package/dist/module/babel/react-native-web.js +112 -0
- package/dist/module/babel/react-native-web.js.map +1 -0
- package/dist/module/babel/react-native.js +112 -0
- package/dist/module/babel/react-native.js.map +1 -0
- package/dist/module/compiler/atRules.js +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 +269 -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 +2092 -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/selector-builder.js +452 -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 +454 -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 +44 -0
- package/dist/module/jest/index.js.map +1 -0
- package/dist/module/jest/setup.js +3 -0
- package/dist/module/jest/setup.js.map +1 -0
- package/dist/module/jest/setupAfterEnv.js +15 -0
- package/dist/module/jest/setupAfterEnv.js.map +1 -0
- package/dist/module/metro/index.js +161 -0
- package/dist/module/metro/index.js.map +1 -0
- package/dist/module/metro/injection-code.js +27 -0
- package/dist/module/metro/injection-code.js.map +1 -0
- package/dist/module/metro/metro-transformer.js +17 -0
- package/dist/module/metro/metro-transformer.js.map +1 -0
- package/dist/module/metro/picocolors.js +67 -0
- package/dist/module/metro/picocolors.js.map +1 -0
- package/dist/module/metro/resolver.js +57 -0
- package/dist/module/metro/resolver.js.map +1 -0
- package/dist/module/metro/stringify.js +55 -0
- package/dist/module/metro/stringify.js.map +1 -0
- package/dist/module/metro/typescript.js +42 -0
- package/dist/module/metro/typescript.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/poison.pill.js +37 -0
- package/dist/module/poison.pill.js.map +1 -0
- package/dist/module/runtime/index.js +9 -0
- package/dist/module/runtime/index.js.map +1 -0
- package/dist/module/runtime/native/api.js +75 -0
- package/dist/module/runtime/native/api.js.map +1 -0
- package/dist/module/runtime/native/conditions/attributes.js +38 -0
- package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
- package/dist/module/runtime/native/conditions/container-query.js +117 -0
- package/dist/module/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/module/runtime/native/conditions/guards.js +29 -0
- package/dist/module/runtime/native/conditions/guards.js.map +1 -0
- package/dist/module/runtime/native/conditions/index.js +34 -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 +94 -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 +153 -0
- package/dist/module/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/module/runtime/native/react/usePassthrough.js +45 -0
- package/dist/module/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/module/runtime/native/reactivity.js +166 -0
- package/dist/module/runtime/native/reactivity.js.map +1 -0
- package/dist/module/runtime/native/root.js +24 -0
- package/dist/module/runtime/native/root.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 +123 -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 +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 +76 -0
- package/dist/module/runtime/utils/objects.js.map +1 -0
- package/dist/module/runtime/utils/specificity.js +39 -0
- package/dist/module/runtime/utils/specificity.js.map +1 -0
- package/dist/module/runtime/utils/style-value.js +16 -0
- package/dist/module/runtime/utils/style-value.js.map +1 -0
- package/dist/module/runtime/utils/utils.types.js +4 -0
- package/dist/module/runtime/utils/utils.types.js.map +1 -0
- package/dist/module/runtime/web/api.js +59 -0
- package/dist/module/runtime/web/api.js.map +1 -0
- package/dist/module/runtime/web/assign-style.js +23 -0
- package/dist/module/runtime/web/assign-style.js.map +1 -0
- package/dist/module/runtime/web/index.js +6 -0
- package/dist/module/runtime/web/index.js.map +1 -0
- package/dist/module/runtime/web/metro.js +5 -0
- package/dist/module/runtime/web/metro.js.map +1 -0
- package/dist/typescript/commonjs/example/app.config.d.ts +4 -0
- package/dist/typescript/commonjs/example/app.config.d.ts.map +1 -0
- package/dist/typescript/commonjs/example/src/App.d.ts +3 -0
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/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 +17 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +199 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +118 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +23 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts +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/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 +20 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts +11 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts +16 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts +2 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +38 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +55 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/root.d.ts +11 -0
- package/dist/typescript/commonjs/src/runtime/native/root.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +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 +13 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts.map +1 -0
- package/dist/typescript/module/example/app.config.d.ts +4 -0
- package/dist/typescript/module/example/app.config.d.ts.map +1 -0
- package/dist/typescript/module/example/src/App.d.ts +3 -0
- package/dist/typescript/module/example/src/App.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/index.d.ts +1 -0
- package/dist/typescript/module/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/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 +17 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +199 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts +118 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/index.d.ts +7 -0
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +23 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts +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/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 +20 -0
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +11 -0
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts +16 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/module/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/module/src/poison.pill.d.ts +2 -0
- package/dist/typescript/module/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/index.d.ts +7 -0
- package/dist/typescript/module/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +38 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +55 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/root.d.ts +11 -0
- package/dist/typescript/module/src/runtime/native/root.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +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 +13 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts.map +1 -0
- package/package.json +246 -47
- package/src/babel/allowedModules.ts +24 -0
- package/src/babel/helpers.ts +40 -0
- package/src/babel/import-plugin.ts +176 -0
- package/src/babel/index.ts +9 -0
- package/src/babel/react-native-web.ts +226 -0
- package/src/babel/react-native.ts +226 -0
- package/src/compiler/atRules.ts +144 -0
- package/src/compiler/attributes.test.ts +28 -0
- package/src/compiler/compiler.ts +298 -0
- package/src/compiler/compiler.types.ts +269 -0
- package/src/compiler/container-query.ts +97 -0
- package/src/compiler/declarations.ts +3124 -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/selector-builder.ts +531 -0
- package/src/compiler/selectors.ts +505 -0
- package/src/compiler/split-by-delimiter.ts +19 -0
- package/src/compiler/stylesheet.ts +655 -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 +65 -0
- package/src/jest/setup.ts +1 -0
- package/src/jest/setupAfterEnv.ts +13 -0
- package/src/metro/index.ts +237 -0
- package/src/metro/injection-code.ts +38 -0
- package/src/metro/metro-transformer.ts +31 -0
- package/src/metro/picocolors.ts +77 -0
- package/src/metro/resolver.ts +89 -0
- package/src/metro/stringify.ts +59 -0
- package/src/metro/typescript.ts +73 -0
- package/src/poison.pill.ts +36 -0
- package/src/runtime/index.ts +7 -0
- package/src/runtime/native/api.ts +106 -0
- package/src/runtime/native/conditions/attributes.ts +52 -0
- package/src/runtime/native/conditions/container-query.ts +162 -0
- package/src/runtime/native/conditions/guards.ts +44 -0
- package/src/runtime/native/conditions/index.ts +52 -0
- package/src/runtime/native/conditions/media-query.ts +92 -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 +203 -0
- package/src/runtime/native/react/usePassthrough.ts +51 -0
- package/src/runtime/native/reactivity.ts +243 -0
- package/src/runtime/native/root.ts +31 -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 +175 -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 +57 -0
- package/src/runtime/native/styles/variables.ts +84 -0
- package/src/runtime/runtime.native.ts +1 -0
- package/src/runtime/runtime.ts +1 -0
- package/src/runtime/runtime.types.ts +130 -0
- package/src/runtime/utils/components.ts +15 -0
- package/src/runtime/utils/dot-notation.types.ts +118 -0
- package/src/runtime/utils/index.ts +5 -0
- package/src/runtime/utils/objects.ts +97 -0
- package/src/runtime/utils/specificity.ts +45 -0
- package/src/runtime/utils/style-value.ts +24 -0
- package/src/runtime/utils/utils.types.ts +19 -0
- package/src/runtime/web/api.ts +88 -0
- package/src/runtime/web/assign-style.ts +26 -0
- package/src/runtime/web/index.ts +5 -0
- package/src/runtime/web/metro.ts +2 -0
- package/types.d.ts +70 -0
- package/.babelrc +0 -17
- package/.editorconfig +0 -17
- package/.eslintignore +0 -3
- package/.eslintrc +0 -39
- package/.npmignore +0 -7
- package/build/index.js +0 -299
- package/build/utils.js +0 -61
- package/circle.yml +0 -31
- package/jsconfig.json +0 -9
- package/login.sh +0 -11
- package/src/index.js +0 -184
- package/src/utils.js +0 -32
- package/test/rnc.test.js +0 -258
- package/yarn.lock +0 -3333
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { LayoutChangeEvent } from "react-native";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
activeFamily,
|
|
6
|
+
containerLayoutFamily,
|
|
7
|
+
focusFamily,
|
|
8
|
+
hoverFamily,
|
|
9
|
+
type Getter as WeakKey,
|
|
10
|
+
} from "../reactivity";
|
|
11
|
+
|
|
12
|
+
const mainCache = new WeakMap<
|
|
13
|
+
WeakKey,
|
|
14
|
+
WeakMap<Function, (event: any) => void>
|
|
15
|
+
>();
|
|
16
|
+
|
|
17
|
+
type Handler = (event: unknown) => void;
|
|
18
|
+
|
|
19
|
+
export type InteractionType =
|
|
20
|
+
| "onLayout"
|
|
21
|
+
| "onHoverIn"
|
|
22
|
+
| "onHoverOut"
|
|
23
|
+
| "onPress"
|
|
24
|
+
| "onPressIn"
|
|
25
|
+
| "onPressOut"
|
|
26
|
+
| "onFocus"
|
|
27
|
+
| "onBlur";
|
|
28
|
+
|
|
29
|
+
const defaultHandlers: Record<InteractionType, Handler> = {
|
|
30
|
+
onLayout: () => {},
|
|
31
|
+
onHoverIn: () => {},
|
|
32
|
+
onHoverOut: () => {},
|
|
33
|
+
onPress: () => {},
|
|
34
|
+
onPressIn: () => {},
|
|
35
|
+
onPressOut: () => {},
|
|
36
|
+
onFocus: () => {},
|
|
37
|
+
onBlur: () => {},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export function getInteractionHandler(
|
|
41
|
+
weakKey: WeakKey,
|
|
42
|
+
type: InteractionType,
|
|
43
|
+
handler = defaultHandlers[type],
|
|
44
|
+
) {
|
|
45
|
+
let cache = mainCache.get(weakKey);
|
|
46
|
+
if (!cache) {
|
|
47
|
+
cache = new WeakMap();
|
|
48
|
+
mainCache.set(weakKey, cache);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
let cached = cache.get(handler);
|
|
52
|
+
if (!cached) {
|
|
53
|
+
cached = (event: any) => {
|
|
54
|
+
if (handler) {
|
|
55
|
+
handler(event);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
switch (type) {
|
|
59
|
+
case "onLayout":
|
|
60
|
+
containerLayoutFamily(weakKey).set(
|
|
61
|
+
(event as LayoutChangeEvent).nativeEvent.layout,
|
|
62
|
+
);
|
|
63
|
+
break;
|
|
64
|
+
case "onHoverIn":
|
|
65
|
+
hoverFamily(weakKey).set(true);
|
|
66
|
+
break;
|
|
67
|
+
case "onHoverOut":
|
|
68
|
+
hoverFamily(weakKey).set(false);
|
|
69
|
+
break;
|
|
70
|
+
case "onPress":
|
|
71
|
+
break;
|
|
72
|
+
case "onPressIn":
|
|
73
|
+
activeFamily(weakKey).set(true);
|
|
74
|
+
break;
|
|
75
|
+
case "onPressOut":
|
|
76
|
+
activeFamily(weakKey).set(false);
|
|
77
|
+
break;
|
|
78
|
+
case "onFocus":
|
|
79
|
+
focusFamily(weakKey).set(true);
|
|
80
|
+
break;
|
|
81
|
+
case "onBlur":
|
|
82
|
+
focusFamily(weakKey).set(false);
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
cache.set(handler, cached);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return cached;
|
|
90
|
+
}
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { InlineVariable, StyleRule } from "../../../compiler";
|
|
3
|
+
import { getDeepPath } from "../../utils";
|
|
4
|
+
import { testRule } from "../conditions";
|
|
5
|
+
import { DEFAULT_CONTAINER_NAME } from "../conditions/container-query";
|
|
6
|
+
import type { RenderGuard } from "../conditions/guards";
|
|
7
|
+
import { StyleCollection } from "../injection";
|
|
8
|
+
import {
|
|
9
|
+
activeFamily,
|
|
10
|
+
containerLayoutFamily,
|
|
11
|
+
focusFamily,
|
|
12
|
+
hoverFamily,
|
|
13
|
+
VAR_SYMBOL,
|
|
14
|
+
weakFamily,
|
|
15
|
+
type VariableContextValue,
|
|
16
|
+
} from "../reactivity";
|
|
17
|
+
import { stylesFamily } from "../styles";
|
|
18
|
+
import type { ComponentState, Config } from "./useNativeCss";
|
|
19
|
+
|
|
20
|
+
export const INLINE_RULE_SYMBOL = Symbol("react-native-css.inlineRule");
|
|
21
|
+
|
|
22
|
+
export function updateRules(
|
|
23
|
+
state: ComponentState,
|
|
24
|
+
// Either update the state with new props or use the current props
|
|
25
|
+
currentProps = state.currentProps,
|
|
26
|
+
inheritedVariables = state.inheritedVariables,
|
|
27
|
+
inheritedContainers = state.inheritedContainers,
|
|
28
|
+
forceUpdate = false,
|
|
29
|
+
isRerender = true,
|
|
30
|
+
): ComponentState {
|
|
31
|
+
const guards: RenderGuard[] = [];
|
|
32
|
+
const rules = new Set<StyleRule | InlineVariable | VariableContextValue>();
|
|
33
|
+
if (forceUpdate) {
|
|
34
|
+
state = { ...state, guards, currentProps };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let usesVariables = false;
|
|
38
|
+
|
|
39
|
+
let variables = state.variables ? inheritedVariables : undefined;
|
|
40
|
+
let containers = state.containers ? inheritedContainers : undefined;
|
|
41
|
+
const inlineVariables = new Set<InlineVariable>();
|
|
42
|
+
|
|
43
|
+
let animated = false;
|
|
44
|
+
|
|
45
|
+
for (const config of state.configs) {
|
|
46
|
+
const source = currentProps?.[config.source];
|
|
47
|
+
const shallowTarget = Array.isArray(config.target)
|
|
48
|
+
? config.target[0]
|
|
49
|
+
: config.target;
|
|
50
|
+
|
|
51
|
+
guards.push(["a", config.source, source]);
|
|
52
|
+
if (shallowTarget) {
|
|
53
|
+
guards.push(["a", shallowTarget, currentProps?.[shallowTarget]]);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const styleRuleSet = [];
|
|
57
|
+
|
|
58
|
+
if (typeof source === "string") {
|
|
59
|
+
const classNames = source.split(/\s+/);
|
|
60
|
+
for (const className of classNames) {
|
|
61
|
+
styleRuleSet.push(
|
|
62
|
+
...StyleCollection.styles(className).get(state.ruleEffect),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const target = getDeepPath(currentProps, config.target);
|
|
68
|
+
if (target) {
|
|
69
|
+
if (Array.isArray(target)) {
|
|
70
|
+
for (const item of target) {
|
|
71
|
+
if (VAR_SYMBOL in item) {
|
|
72
|
+
inlineVariables.add(item);
|
|
73
|
+
} else if (
|
|
74
|
+
INLINE_RULE_SYMBOL in item &&
|
|
75
|
+
typeof item[INLINE_RULE_SYMBOL] === "string"
|
|
76
|
+
) {
|
|
77
|
+
pushInlineRule(state, item, styleRuleSet);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
} else if (
|
|
81
|
+
config.target &&
|
|
82
|
+
typeof target === "object" &&
|
|
83
|
+
target &&
|
|
84
|
+
VAR_SYMBOL in target
|
|
85
|
+
) {
|
|
86
|
+
inlineVariables.add(target);
|
|
87
|
+
} else if (
|
|
88
|
+
INLINE_RULE_SYMBOL in target &&
|
|
89
|
+
typeof target[INLINE_RULE_SYMBOL] === "string"
|
|
90
|
+
) {
|
|
91
|
+
pushInlineRule(state, target, styleRuleSet);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
for (let rule of styleRuleSet) {
|
|
96
|
+
// Even if a rule does not match, make sure we register that it could set
|
|
97
|
+
// a variable or container or be animated.
|
|
98
|
+
if (rule.v) usesVariables = true;
|
|
99
|
+
if (rule.c) containers ??= inheritedContainers;
|
|
100
|
+
if (rule.a) animated = true;
|
|
101
|
+
|
|
102
|
+
usesVariables ||= Boolean(rule.dv);
|
|
103
|
+
|
|
104
|
+
if (
|
|
105
|
+
!testRule(
|
|
106
|
+
rule,
|
|
107
|
+
state.ruleEffectGetter,
|
|
108
|
+
currentProps,
|
|
109
|
+
guards,
|
|
110
|
+
inheritedContainers,
|
|
111
|
+
)
|
|
112
|
+
) {
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (rule.v) {
|
|
117
|
+
// We're going to set a value, so we need to create a new object
|
|
118
|
+
if (variables === inheritedVariables) {
|
|
119
|
+
variables = { ...inheritedVariables };
|
|
120
|
+
} else {
|
|
121
|
+
variables ??= { ...inheritedVariables };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
for (const v of rule.v) {
|
|
125
|
+
variables![v[0]] = v[1];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (rule.c) {
|
|
130
|
+
// We're going to set a value, so we need to create a new object
|
|
131
|
+
if (containers === inheritedContainers) {
|
|
132
|
+
containers = {
|
|
133
|
+
...inheritedContainers,
|
|
134
|
+
// This container becomes the default container
|
|
135
|
+
[DEFAULT_CONTAINER_NAME]: state.ruleEffectGetter,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// This this component as the named container
|
|
140
|
+
for (const name of rule.c) {
|
|
141
|
+
containers![name] = state.ruleEffectGetter;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Enable hover/active/focus/layout handlers
|
|
145
|
+
hoverFamily(state.ruleEffectGetter);
|
|
146
|
+
activeFamily(state.ruleEffectGetter);
|
|
147
|
+
focusFamily(state.ruleEffectGetter);
|
|
148
|
+
containerLayoutFamily(state.ruleEffectGetter);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (rule.a) {
|
|
152
|
+
animated = true;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Rules normally target style. If the target is not style, we need to create a new rule.
|
|
156
|
+
if (config.target !== "style") {
|
|
157
|
+
rule = getRuleVariation(rule)(config);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Add the rule to the set and update the hash
|
|
161
|
+
rules.add(rule);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (process.env.NODE_ENV !== "production") {
|
|
165
|
+
if (isRerender) {
|
|
166
|
+
let pressable = activeFamily.has(state.ruleEffectGetter);
|
|
167
|
+
|
|
168
|
+
if (Boolean(variables) !== Boolean(state.variables)) {
|
|
169
|
+
console.log(
|
|
170
|
+
`ReactNativeCss: className '${source}' added or removed a variable after the initial render. This causes the components state to be reset and all children be re-mounted. Use the className 'will-change-variable' to avoid this warning. If this was caused by sibling components being added/removed, use a 'key' prop so React can track the component correctly.`,
|
|
171
|
+
);
|
|
172
|
+
} else if (Boolean(containers) !== Boolean(state.containers)) {
|
|
173
|
+
console.log(
|
|
174
|
+
`ReactNativeCss: className '${source}' added or removed a container after the initial render. This causes the components state to be reset and all children be re-mounted. This will cause unexpected behavior. Use the className 'will-change-container' to avoid this warning. If this was caused by sibling components being added/removed, use a 'key' prop so React can track the component correctly.`,
|
|
175
|
+
);
|
|
176
|
+
} else if (animated !== state.animated) {
|
|
177
|
+
console.log(
|
|
178
|
+
`ReactNativeCss: className '${source}' added or removed an animation after the initial render. This causes the components state to be reset and all children be re-mounted. This will cause unexpected behavior. Use the className 'will-change-animation' to avoid this warning. If this was caused by sibling components being added/removed, use a 'key' prop so React can track the component correctly.`,
|
|
179
|
+
);
|
|
180
|
+
} else if (pressable !== state.pressable) {
|
|
181
|
+
console.log(
|
|
182
|
+
`ReactNativeCss: className '${source}' added or removed a pressable state after the initial render. This causes the components state to be reset and all children be re-mounted. This will cause unexpected behavior. Use the className 'will-change-pressable' to avoid this warning. If this was caused by sibling components being added/removed, use a 'key' prop so React can track the component correctly.`,
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// We only track this in development
|
|
190
|
+
let pressable =
|
|
191
|
+
process.env.NODE_ENV === "production"
|
|
192
|
+
? undefined
|
|
193
|
+
: activeFamily.has(state.ruleEffectGetter);
|
|
194
|
+
|
|
195
|
+
if (!rules.size && !state.stylesObs && !inlineVariables.size) {
|
|
196
|
+
return {
|
|
197
|
+
...state,
|
|
198
|
+
currentProps,
|
|
199
|
+
guards,
|
|
200
|
+
animated,
|
|
201
|
+
pressable,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
if (usesVariables || variables) {
|
|
206
|
+
rules.add(inheritedVariables);
|
|
207
|
+
|
|
208
|
+
if (inlineVariables.size) {
|
|
209
|
+
variables = Object.assign(
|
|
210
|
+
{},
|
|
211
|
+
variables,
|
|
212
|
+
inheritedVariables,
|
|
213
|
+
...Array.from(inlineVariables),
|
|
214
|
+
{ [VAR_SYMBOL]: true },
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
for (const variable of inlineVariables) {
|
|
219
|
+
rules.add(variable);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Generate a StyleObservable for this unique set of rules / variables
|
|
224
|
+
const stylesObs = stylesFamily(generateStateHash(state, rules), rules);
|
|
225
|
+
|
|
226
|
+
// Get the guards without subscribing to the observable
|
|
227
|
+
// We will subscribe within the render using the StyleEffect
|
|
228
|
+
guards.push(...stylesObs.get().guards);
|
|
229
|
+
|
|
230
|
+
// If these are the same styles with no inline variables, we can skip the update
|
|
231
|
+
if (state.stylesObs === stylesObs && !inlineVariables.size) {
|
|
232
|
+
return state;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Remove this component from the old observer
|
|
236
|
+
state.stylesObs?.cleanup(state.ruleEffect);
|
|
237
|
+
|
|
238
|
+
return {
|
|
239
|
+
...state,
|
|
240
|
+
currentProps,
|
|
241
|
+
stylesObs,
|
|
242
|
+
variables,
|
|
243
|
+
containers,
|
|
244
|
+
guards,
|
|
245
|
+
animated,
|
|
246
|
+
pressable,
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Create variations of a style rule based on the config.
|
|
252
|
+
* Cache for reference equality.
|
|
253
|
+
*/
|
|
254
|
+
const getRuleVariation = weakFamily((rule: StyleRule) => {
|
|
255
|
+
return weakFamily((config: Config): StyleRule => {
|
|
256
|
+
return { ...rule, target: config.target };
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
function pushInlineRule(
|
|
261
|
+
state: ComponentState,
|
|
262
|
+
item: any,
|
|
263
|
+
styleRuleSet: StyleRule[],
|
|
264
|
+
) {
|
|
265
|
+
for (const className of item[INLINE_RULE_SYMBOL].split(/\s+/)) {
|
|
266
|
+
let inlineRuleSet = StyleCollection.styles(className).get(state.ruleEffect);
|
|
267
|
+
|
|
268
|
+
for (let rule of inlineRuleSet) {
|
|
269
|
+
styleRuleSet.push(rule);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Get a unique number for a weak key.
|
|
276
|
+
*/
|
|
277
|
+
let hashKeyCount = 0;
|
|
278
|
+
const hashKeyFamily = weakFamily(() => hashKeyCount++);
|
|
279
|
+
|
|
280
|
+
export function generateStateHash(
|
|
281
|
+
state: ComponentState,
|
|
282
|
+
iterableKeys?: Iterable<WeakKey>,
|
|
283
|
+
variables?: WeakKey,
|
|
284
|
+
inlineVars?: Set<WeakKey>,
|
|
285
|
+
): string {
|
|
286
|
+
if (!iterableKeys) {
|
|
287
|
+
return "";
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const keys = [state.configs, ...iterableKeys];
|
|
291
|
+
|
|
292
|
+
if (variables) {
|
|
293
|
+
keys.push(variables);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (inlineVars) {
|
|
297
|
+
keys.push(...inlineVars);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
return generateHash(keys);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Quickly generate a unique hash for a set of numbers.
|
|
305
|
+
* This is not a cryptographic hash, but it is fast and has a low chance of collision.
|
|
306
|
+
*/
|
|
307
|
+
const MOD = 9007199254740871; // Largest prime within safe integer range 2^53
|
|
308
|
+
const PRIME = 31; // A smaller prime for mixing
|
|
309
|
+
export function generateHash(keys: WeakKey[]): string {
|
|
310
|
+
let hash = 0;
|
|
311
|
+
let product = 1; // Used for mixing to enhance uniqueness
|
|
312
|
+
|
|
313
|
+
for (const key of keys) {
|
|
314
|
+
if (!key) continue; // Skip if key is undefined
|
|
315
|
+
|
|
316
|
+
const num = hashKeyFamily(key);
|
|
317
|
+
hash = (hash ^ num) % MOD; // XOR and modular arithmetic
|
|
318
|
+
product = (product * (num + PRIME)) % MOD; // Mix with multiplication
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Combine hash and product to form the final hash
|
|
322
|
+
hash = (hash + product) % MOD;
|
|
323
|
+
|
|
324
|
+
// Return the hash as a string
|
|
325
|
+
return hash.toString(36);
|
|
326
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import {
|
|
3
|
+
createElement,
|
|
4
|
+
Fragment,
|
|
5
|
+
useContext,
|
|
6
|
+
useEffect,
|
|
7
|
+
useState,
|
|
8
|
+
type ComponentType,
|
|
9
|
+
} from "react";
|
|
10
|
+
import { Pressable, View } from "react-native";
|
|
11
|
+
|
|
12
|
+
import type { StyledConfiguration } from "../../runtime.types";
|
|
13
|
+
import { testGuards, type RenderGuard } from "../conditions/guards";
|
|
14
|
+
import {
|
|
15
|
+
cleanupEffect,
|
|
16
|
+
ContainerContext,
|
|
17
|
+
VariableContext,
|
|
18
|
+
type ContainerContextValue,
|
|
19
|
+
type Effect,
|
|
20
|
+
type Getter,
|
|
21
|
+
type VariableContextValue,
|
|
22
|
+
} from "../reactivity";
|
|
23
|
+
import { getStyledProps, stylesFamily } from "../styles";
|
|
24
|
+
import { animatedComponentFamily } from "../styles/animation";
|
|
25
|
+
import { updateRules } from "./rules";
|
|
26
|
+
|
|
27
|
+
export type Config = {
|
|
28
|
+
source: string;
|
|
29
|
+
target: string[] | string | false;
|
|
30
|
+
nativeStyleMapping?: Record<string, string>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type ComponentState = {
|
|
34
|
+
/** The source/target for classNames */
|
|
35
|
+
configs: Config[];
|
|
36
|
+
|
|
37
|
+
/** Reactive tracking */
|
|
38
|
+
ruleEffect: Effect;
|
|
39
|
+
ruleEffectGetter: Getter;
|
|
40
|
+
styleEffect: Effect;
|
|
41
|
+
|
|
42
|
+
/** The components props */
|
|
43
|
+
currentProps?: Record<string, any> | undefined | null;
|
|
44
|
+
|
|
45
|
+
/** An observable of the normal/important props */
|
|
46
|
+
stylesObs?: ReturnType<typeof stylesFamily>;
|
|
47
|
+
guards?: RenderGuard[];
|
|
48
|
+
|
|
49
|
+
variables?: VariableContextValue;
|
|
50
|
+
containers?: ContainerContextValue;
|
|
51
|
+
|
|
52
|
+
inheritedVariables: VariableContextValue;
|
|
53
|
+
inheritedContainers: ContainerContextValue;
|
|
54
|
+
|
|
55
|
+
animated?: boolean;
|
|
56
|
+
pressable?: undefined | boolean;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* useNativeCss is the native implementation of the useCssElement hook.
|
|
61
|
+
*/
|
|
62
|
+
export function useNativeCss(
|
|
63
|
+
type: ComponentType<any>,
|
|
64
|
+
originalProps: Record<string, any> | undefined | null,
|
|
65
|
+
configs: Config[] = [{ source: "className", target: "style" }],
|
|
66
|
+
) {
|
|
67
|
+
const inheritedVariables = useContext(VariableContext);
|
|
68
|
+
const inheritedContainers = useContext(ContainerContext);
|
|
69
|
+
|
|
70
|
+
const [state, setState] = useState((): ComponentState => {
|
|
71
|
+
// Both effects share the same observers to improve memory usage
|
|
72
|
+
const observers = new Set<Effect>();
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* When fired, this effect will force the rules to be re-evaluated.
|
|
76
|
+
* This will cause a re-render if there are different rules
|
|
77
|
+
*
|
|
78
|
+
* Use this when a rule condition changes, e.g FastRefresh or media queries
|
|
79
|
+
*/
|
|
80
|
+
const ruleEffect: Effect = {
|
|
81
|
+
observers,
|
|
82
|
+
run: () => setState((state) => updateRules(state)),
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* When fired, this effect will force a re-render of the component.
|
|
87
|
+
* This will cause a re-fetch of the styles.
|
|
88
|
+
*
|
|
89
|
+
* Use this when a value changes, e.g vm units or light / dark mode
|
|
90
|
+
*/
|
|
91
|
+
const styleEffect: Effect = {
|
|
92
|
+
observers,
|
|
93
|
+
run: () => setState((state) => ({ ...state })),
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return updateRules(
|
|
97
|
+
{
|
|
98
|
+
ruleEffect,
|
|
99
|
+
ruleEffectGetter: (observable) => observable.get(ruleEffect),
|
|
100
|
+
styleEffect,
|
|
101
|
+
configs,
|
|
102
|
+
inheritedContainers,
|
|
103
|
+
inheritedVariables,
|
|
104
|
+
pressable: type === View ? false : undefined,
|
|
105
|
+
},
|
|
106
|
+
originalProps,
|
|
107
|
+
inheritedVariables,
|
|
108
|
+
inheritedContainers,
|
|
109
|
+
false,
|
|
110
|
+
false,
|
|
111
|
+
);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// Both effects share the same observers, so we only need to cleanup one of them
|
|
115
|
+
useEffect(() => () => cleanupEffect(state.ruleEffect), [state.ruleEffect]);
|
|
116
|
+
|
|
117
|
+
// Check if our derived state has changed (e.g the className prop)
|
|
118
|
+
if (
|
|
119
|
+
testGuards(state, originalProps, inheritedVariables, inheritedContainers)
|
|
120
|
+
) {
|
|
121
|
+
/**
|
|
122
|
+
* Get the new state
|
|
123
|
+
* Note, this might result in the same styles, but the guards will now be different
|
|
124
|
+
*/
|
|
125
|
+
setState(
|
|
126
|
+
updateRules(
|
|
127
|
+
state,
|
|
128
|
+
originalProps,
|
|
129
|
+
inheritedVariables,
|
|
130
|
+
inheritedContainers,
|
|
131
|
+
true,
|
|
132
|
+
),
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
// We can bail on rendering as the result of this render will be discarded
|
|
136
|
+
return createElement(Fragment);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
let props = getStyledProps(state, originalProps);
|
|
140
|
+
|
|
141
|
+
if (type === View && props?.onPress) {
|
|
142
|
+
type = Pressable;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (state.animated) {
|
|
146
|
+
type = animatedComponentFamily(type);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (state.variables) {
|
|
150
|
+
props = {
|
|
151
|
+
value: state.variables,
|
|
152
|
+
children: createElement(type, props),
|
|
153
|
+
};
|
|
154
|
+
type = VariableContext.Provider;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (state.containers) {
|
|
158
|
+
props = {
|
|
159
|
+
value: state.containers,
|
|
160
|
+
children: createElement(type, props),
|
|
161
|
+
};
|
|
162
|
+
type = ContainerContext.Provider;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return createElement(type, props);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Convert the styled() mapping to a config array
|
|
170
|
+
*/
|
|
171
|
+
export function mappingToConfig(mapping: StyledConfiguration<any>) {
|
|
172
|
+
return Object.entries(mapping).flatMap(([key, value]): Config => {
|
|
173
|
+
if (value === true) {
|
|
174
|
+
return { source: key, target: key };
|
|
175
|
+
} else if (value === false) {
|
|
176
|
+
return { source: key, target: false };
|
|
177
|
+
} else if (typeof value === "string") {
|
|
178
|
+
return { source: key, target: value.split(".") };
|
|
179
|
+
} else if (typeof value === "object") {
|
|
180
|
+
if (Array.isArray(value)) {
|
|
181
|
+
return { source: key, target: value };
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if ("target" in value) {
|
|
185
|
+
if (value.target === false) {
|
|
186
|
+
return { source: key, target: false };
|
|
187
|
+
} else if (typeof value.target === "string") {
|
|
188
|
+
const target = value.target.split(".");
|
|
189
|
+
|
|
190
|
+
if (target.length === 1) {
|
|
191
|
+
return { source: key, target: target[0]! };
|
|
192
|
+
} else {
|
|
193
|
+
return { source: key, target };
|
|
194
|
+
}
|
|
195
|
+
} else if (Array.isArray(value.target)) {
|
|
196
|
+
return { source: key, target: value.target };
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
throw new Error(`styled(): Invalid mapping for ${key}: ${value}`);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { createElement, type ComponentType } from "react";
|
|
3
|
+
|
|
4
|
+
import { INLINE_RULE_SYMBOL } from "./rules";
|
|
5
|
+
import type { Config } from "./useNativeCss";
|
|
6
|
+
|
|
7
|
+
const cache = new Map<string, Record<string, any>>();
|
|
8
|
+
|
|
9
|
+
export function usePassthrough(
|
|
10
|
+
type: ComponentType<any>,
|
|
11
|
+
{ ...props }: Record<string, any>,
|
|
12
|
+
configs: Config[],
|
|
13
|
+
) {
|
|
14
|
+
for (const config of configs) {
|
|
15
|
+
let { source, target } = config;
|
|
16
|
+
|
|
17
|
+
const classNames = props[source];
|
|
18
|
+
|
|
19
|
+
let styles = cache.get(source);
|
|
20
|
+
if (styles === undefined) {
|
|
21
|
+
styles = { [INLINE_RULE_SYMBOL]: classNames };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
delete props[source];
|
|
25
|
+
|
|
26
|
+
if (classNames === undefined || target === false) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let targetProps = props;
|
|
31
|
+
|
|
32
|
+
if (Array.isArray(target)) {
|
|
33
|
+
for (let i = 0; i < target.length - 1; i++) {
|
|
34
|
+
const prop = target[i]!;
|
|
35
|
+
props[prop] ??= {};
|
|
36
|
+
targetProps = props[prop];
|
|
37
|
+
}
|
|
38
|
+
target = target[target.length - 1]!;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (Array.isArray(targetProps[target])) {
|
|
42
|
+
targetProps[target] = [...targetProps[target], styles];
|
|
43
|
+
} else if (targetProps[target]) {
|
|
44
|
+
targetProps[target] = [targetProps[target], styles];
|
|
45
|
+
} else {
|
|
46
|
+
targetProps[target] = styles;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return createElement(type, props);
|
|
51
|
+
}
|