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,655 @@
|
|
|
1
|
+
import type { SelectorList } from "lightningcss";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
isStyleDescriptorArray,
|
|
5
|
+
Specificity,
|
|
6
|
+
specificityCompareFn,
|
|
7
|
+
} from "../runtime/utils";
|
|
8
|
+
import type {
|
|
9
|
+
AnimationKeyframes_V2,
|
|
10
|
+
AnimationRecord,
|
|
11
|
+
CompilerOptions,
|
|
12
|
+
ContainerQuery,
|
|
13
|
+
MediaCondition,
|
|
14
|
+
ReactNativeCssStyleSheet,
|
|
15
|
+
StyleDeclaration,
|
|
16
|
+
StyleDescriptor,
|
|
17
|
+
StyleFunction,
|
|
18
|
+
StyleRule,
|
|
19
|
+
StyleRuleMapping,
|
|
20
|
+
StyleRuleSet,
|
|
21
|
+
VariableRecord,
|
|
22
|
+
VariableValue,
|
|
23
|
+
} from "./compiler.types";
|
|
24
|
+
import { getClassNameSelectors, toRNProperty } from "./selector-builder";
|
|
25
|
+
|
|
26
|
+
type BuilderMode = "style" | "media" | "container" | "keyframes";
|
|
27
|
+
|
|
28
|
+
const staticDeclarations = new WeakMap<
|
|
29
|
+
WeakKey,
|
|
30
|
+
Record<string, StyleDescriptor>
|
|
31
|
+
>();
|
|
32
|
+
|
|
33
|
+
const extraRules = new WeakMap<StyleRule, Partial<StyleRule>[]>();
|
|
34
|
+
|
|
35
|
+
export class StylesheetBuilder {
|
|
36
|
+
animationFrames?: AnimationKeyframes_V2[];
|
|
37
|
+
animationDeclarations: StyleDeclaration[] = [];
|
|
38
|
+
|
|
39
|
+
stylesheet: ReactNativeCssStyleSheet = {};
|
|
40
|
+
|
|
41
|
+
varUsage = new Set<string>();
|
|
42
|
+
|
|
43
|
+
private rule: StyleRule = {
|
|
44
|
+
s: [],
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
constructor(
|
|
48
|
+
private options: CompilerOptions,
|
|
49
|
+
public mode: BuilderMode = "style",
|
|
50
|
+
private ruleTemplate: StyleRule = {
|
|
51
|
+
s: [],
|
|
52
|
+
},
|
|
53
|
+
private mapping: StyleRuleMapping = {},
|
|
54
|
+
public descriptorProperty?: string,
|
|
55
|
+
private shared: {
|
|
56
|
+
ruleSets: Record<string, StyleRuleSet>;
|
|
57
|
+
rootVariables?: VariableRecord;
|
|
58
|
+
universalVariables?: VariableRecord;
|
|
59
|
+
animations?: AnimationRecord;
|
|
60
|
+
rem: number;
|
|
61
|
+
ruleOrder: number;
|
|
62
|
+
warningProperty?: string;
|
|
63
|
+
warningProperties: string[];
|
|
64
|
+
warningValues: Record<string, unknown[]>;
|
|
65
|
+
warningFunctions: string[];
|
|
66
|
+
} = {
|
|
67
|
+
ruleSets: {},
|
|
68
|
+
rem: 14,
|
|
69
|
+
ruleOrder: 0,
|
|
70
|
+
warningProperties: [],
|
|
71
|
+
warningValues: {},
|
|
72
|
+
warningFunctions: [],
|
|
73
|
+
},
|
|
74
|
+
private selectors: SelectorList = [],
|
|
75
|
+
) {}
|
|
76
|
+
|
|
77
|
+
fork(mode = this.mode, selectors: SelectorList = []): StylesheetBuilder {
|
|
78
|
+
this.shared.ruleOrder++;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* If we already have selectors and we are added more
|
|
82
|
+
* Then these must be nested selectors.
|
|
83
|
+
*
|
|
84
|
+
* We need to extrapolate out the selectors to their full values
|
|
85
|
+
*/
|
|
86
|
+
selectors =
|
|
87
|
+
this.selectors.length && selectors.length
|
|
88
|
+
? this.selectors.flatMap((selectorA) => {
|
|
89
|
+
return selectors.map((selectorB) => [...selectorA, ...selectorB]);
|
|
90
|
+
})
|
|
91
|
+
: [...this.selectors, ...selectors];
|
|
92
|
+
|
|
93
|
+
return new StylesheetBuilder(
|
|
94
|
+
this.options,
|
|
95
|
+
mode,
|
|
96
|
+
this.cloneRule(),
|
|
97
|
+
{ ...this.mapping },
|
|
98
|
+
this.descriptorProperty,
|
|
99
|
+
this.shared,
|
|
100
|
+
selectors,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
cloneRule({ ...rule } = this.ruleTemplate): StyleRule {
|
|
105
|
+
rule.s = [...rule.s];
|
|
106
|
+
rule.aq &&= [...rule.aq];
|
|
107
|
+
rule.c &&= [...rule.c];
|
|
108
|
+
rule.cq &&= [...rule.cq];
|
|
109
|
+
rule.d &&= [...rule.d];
|
|
110
|
+
rule.m &&= [...rule.m];
|
|
111
|
+
rule.p &&= { ...rule.p };
|
|
112
|
+
rule.v &&= [...rule.v];
|
|
113
|
+
|
|
114
|
+
return rule;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private createRuleFromPartial(rule: StyleRule, partial: Partial<StyleRule>) {
|
|
118
|
+
rule = this.cloneRule(rule);
|
|
119
|
+
|
|
120
|
+
if (partial.m) {
|
|
121
|
+
rule.m ??= [];
|
|
122
|
+
rule.m.push(...partial.m);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (partial.d) {
|
|
126
|
+
rule.d = partial.d;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return rule;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
extendRule(rule: Partial<StyleRule>) {
|
|
133
|
+
return this.cloneRule({ ...this.rule, ...rule });
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
getOptions(): CompilerOptions {
|
|
137
|
+
return this.options;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
setOptions<T extends keyof CompilerOptions>(
|
|
141
|
+
key: T,
|
|
142
|
+
value: CompilerOptions[T],
|
|
143
|
+
) {
|
|
144
|
+
this.options[key] = value;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
getNativeStyleSheet(): ReactNativeCssStyleSheet {
|
|
148
|
+
const stylesheetOptions: ReactNativeCssStyleSheet = {};
|
|
149
|
+
|
|
150
|
+
const ruleSets = this.getRuleSets();
|
|
151
|
+
if (ruleSets) {
|
|
152
|
+
stylesheetOptions.s = ruleSets;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (this.shared.rootVariables) {
|
|
156
|
+
stylesheetOptions.vr = Object.entries(this.shared.rootVariables).map(
|
|
157
|
+
// Reverse these so the most specific variables are first
|
|
158
|
+
([key, value]) => [key, value.reverse()] as const,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (this.shared.universalVariables) {
|
|
163
|
+
stylesheetOptions.vu = Object.entries(this.shared.universalVariables).map(
|
|
164
|
+
// Reverse these so the most specific variables are first
|
|
165
|
+
([key, value]) => [key, value.reverse()] as const,
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (this.shared.animations) {
|
|
170
|
+
stylesheetOptions.k = Object.entries(this.shared.animations);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return stylesheetOptions;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
getRuleSets() {
|
|
177
|
+
const entries = Object.entries(this.shared.ruleSets);
|
|
178
|
+
|
|
179
|
+
if (!entries.length) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return Object.entries(this.shared.ruleSets).map(
|
|
184
|
+
([key, value]) =>
|
|
185
|
+
[key, value.sort((a, b) => specificityCompareFn(a, b))] as const,
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
setWarningProperty(property: string) {
|
|
190
|
+
this.shared.warningProperty = property;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
addWarning(type: "property" | "value", property: string): void;
|
|
194
|
+
addWarning(type: "style", property: string, value: unknown): void;
|
|
195
|
+
addWarning(
|
|
196
|
+
type: "property" | "style" | "value",
|
|
197
|
+
property: string,
|
|
198
|
+
value?: unknown,
|
|
199
|
+
): void {
|
|
200
|
+
switch (type) {
|
|
201
|
+
case "property":
|
|
202
|
+
this.shared.warningProperties.push(property);
|
|
203
|
+
break;
|
|
204
|
+
case "value": {
|
|
205
|
+
value = property;
|
|
206
|
+
property = this.shared.warningProperty ?? "";
|
|
207
|
+
|
|
208
|
+
if (!property) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
this.shared.warningValues[property] ??= [];
|
|
213
|
+
this.shared.warningValues[property]?.push(value);
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
case "style":
|
|
217
|
+
this.shared.warningValues[property] ??= [];
|
|
218
|
+
this.shared.warningValues[property]?.push(value);
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
getWarnings() {
|
|
224
|
+
const result: {
|
|
225
|
+
properties?: string[];
|
|
226
|
+
values?: Record<string, unknown[]>;
|
|
227
|
+
functions?: string[];
|
|
228
|
+
} = {};
|
|
229
|
+
|
|
230
|
+
if (this.shared.warningProperties.length) {
|
|
231
|
+
result.properties = this.shared.warningProperties;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (Object.keys(this.shared.warningValues).length) {
|
|
235
|
+
result.values = this.shared.warningValues;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (this.shared.warningFunctions.length) {
|
|
239
|
+
result.functions = this.shared.warningFunctions;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return result;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
addMapping(mapping: StyleRuleMapping) {
|
|
246
|
+
this.mapping = { ...this.mapping, ...mapping };
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
newRule(mapping = this.mapping, { important = false } = {}) {
|
|
250
|
+
this.mapping = mapping;
|
|
251
|
+
this.rule = this.cloneRule(this.ruleTemplate);
|
|
252
|
+
this.rule.s[Specificity.Order] = this.shared.ruleOrder;
|
|
253
|
+
if (important) {
|
|
254
|
+
this.rule.s[Specificity.Important] = 1;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/** Used by nested declarations (for example @media inside a RuleSet) */
|
|
259
|
+
newNestedRule({ important = false } = {}) {
|
|
260
|
+
this.newRule(this.mapping, { important });
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/** Hack for light-dark, which requires adding a new rule without changing the current rule */
|
|
264
|
+
addExtraRule(rule: Partial<StyleRule>) {
|
|
265
|
+
let extraRuleArray = extraRules.get(this.rule);
|
|
266
|
+
if (!extraRuleArray) {
|
|
267
|
+
extraRuleArray = [];
|
|
268
|
+
extraRules.set(this.rule, extraRuleArray);
|
|
269
|
+
}
|
|
270
|
+
extraRuleArray.push(rule);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
private addRuleToRuleSet(name: string, rule = this.rule) {
|
|
274
|
+
if (this.shared.ruleSets[name]) {
|
|
275
|
+
this.shared.ruleSets[name].push(rule);
|
|
276
|
+
} else {
|
|
277
|
+
this.shared.ruleSets[name] = [rule];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
addMediaQuery(condition: MediaCondition) {
|
|
282
|
+
this.ruleTemplate.m ??= [];
|
|
283
|
+
this.ruleTemplate.m.push(condition);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
addContainer(value: string[] | false) {
|
|
287
|
+
this.rule.c ??= [];
|
|
288
|
+
|
|
289
|
+
if (value === false) {
|
|
290
|
+
this.rule.c = [];
|
|
291
|
+
} else {
|
|
292
|
+
this.rule.c.push(...value.map((name) => `c:${name}`));
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
addUnnamedDescriptor(
|
|
297
|
+
value: StyleDescriptor,
|
|
298
|
+
forceTuple?: boolean,
|
|
299
|
+
rule = this.rule,
|
|
300
|
+
) {
|
|
301
|
+
if (this.descriptorProperty === undefined) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
this.addDescriptor(this.descriptorProperty, value, forceTuple, rule);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
addDescriptor(
|
|
309
|
+
property: string,
|
|
310
|
+
value: StyleDescriptor,
|
|
311
|
+
forceTuple?: boolean,
|
|
312
|
+
rule = this.rule,
|
|
313
|
+
) {
|
|
314
|
+
if (value === undefined) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
if (this.mode === "keyframes") {
|
|
319
|
+
property = toRNProperty(property);
|
|
320
|
+
this.pushDescriptor(
|
|
321
|
+
property,
|
|
322
|
+
value,
|
|
323
|
+
this.animationDeclarations,
|
|
324
|
+
forceTuple,
|
|
325
|
+
);
|
|
326
|
+
} else if (property.startsWith("--")) {
|
|
327
|
+
// If we have enabled variable usage tracking, skip unused variables
|
|
328
|
+
if (
|
|
329
|
+
this.options.stripUnusedVariables &&
|
|
330
|
+
!property.startsWith("--__rn-css") &&
|
|
331
|
+
!this.varUsage.has(property)
|
|
332
|
+
) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
rule.v ??= [];
|
|
337
|
+
rule.v.push([property.slice(2), value]);
|
|
338
|
+
} else if (isStyleFunction(value)) {
|
|
339
|
+
const [delayed, usesVariables] = postProcessStyleFunction(value);
|
|
340
|
+
|
|
341
|
+
rule.d ??= [];
|
|
342
|
+
if (value[1] === "@animation") {
|
|
343
|
+
rule.a ??= true;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
if (usesVariables) {
|
|
347
|
+
rule.dv = 1;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
this.pushDescriptor(
|
|
351
|
+
property,
|
|
352
|
+
value,
|
|
353
|
+
rule.d,
|
|
354
|
+
forceTuple,
|
|
355
|
+
delayed || usesVariables,
|
|
356
|
+
);
|
|
357
|
+
} else {
|
|
358
|
+
if (
|
|
359
|
+
property.startsWith("animation-") ||
|
|
360
|
+
property.startsWith("transition-") ||
|
|
361
|
+
property === "transition"
|
|
362
|
+
) {
|
|
363
|
+
rule.a ??= true;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
rule.d ??= [];
|
|
367
|
+
this.pushDescriptor(property, value, rule.d);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
addShorthand(property: string, options: Record<string, StyleDescriptor>) {
|
|
372
|
+
if (allEqual(...Object.values(options))) {
|
|
373
|
+
this.addDescriptor(property, Object.values(options)[0]);
|
|
374
|
+
} else {
|
|
375
|
+
for (const [name, value] of Object.entries(options)) {
|
|
376
|
+
this.addDescriptor(name, value);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
private pushDescriptor(
|
|
382
|
+
rawProperty: string,
|
|
383
|
+
value: StyleDescriptor,
|
|
384
|
+
declarations: StyleDeclaration[],
|
|
385
|
+
forceTuple = false,
|
|
386
|
+
delayed = false,
|
|
387
|
+
) {
|
|
388
|
+
const property = toRNProperty(rawProperty);
|
|
389
|
+
|
|
390
|
+
let propPath: string | string[] | undefined =
|
|
391
|
+
this.mapping[rawProperty] ?? this.mapping[property] ?? this.mapping["*"];
|
|
392
|
+
|
|
393
|
+
if (Array.isArray(propPath)) {
|
|
394
|
+
const [first, second] = propPath;
|
|
395
|
+
|
|
396
|
+
if (propPath.length === 2 && first === "*" && second) {
|
|
397
|
+
propPath = second;
|
|
398
|
+
} else {
|
|
399
|
+
forceTuple = true;
|
|
400
|
+
}
|
|
401
|
+
} else if (propPath) {
|
|
402
|
+
forceTuple = true;
|
|
403
|
+
} else {
|
|
404
|
+
propPath = property;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
if (isStyleFunction(value)) {
|
|
408
|
+
if (delayed) {
|
|
409
|
+
declarations.push([value, propPath, 1]);
|
|
410
|
+
} else {
|
|
411
|
+
declarations.push([value, propPath]);
|
|
412
|
+
}
|
|
413
|
+
} else if (forceTuple || Array.isArray(propPath)) {
|
|
414
|
+
declarations.push([value, propPath]);
|
|
415
|
+
} else if (Array.isArray(value) && value.some(isStyleFunction)) {
|
|
416
|
+
declarations.push([value, propPath]);
|
|
417
|
+
} else {
|
|
418
|
+
let staticDeclarationRecord = staticDeclarations.get(declarations);
|
|
419
|
+
if (!staticDeclarationRecord) {
|
|
420
|
+
staticDeclarationRecord = {};
|
|
421
|
+
staticDeclarations.set(declarations, staticDeclarationRecord);
|
|
422
|
+
declarations.push(staticDeclarationRecord);
|
|
423
|
+
}
|
|
424
|
+
staticDeclarationRecord[propPath] = value;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
applyRuleToSelectors(selectorList = this.selectors): void {
|
|
429
|
+
if (!selectorList.length) {
|
|
430
|
+
// If there are no selectors, we cannot apply the rule
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if (!this.rule.d && !this.rule.v) {
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
const normalizedSelectors = getClassNameSelectors(
|
|
439
|
+
selectorList,
|
|
440
|
+
this.options,
|
|
441
|
+
);
|
|
442
|
+
|
|
443
|
+
for (const selector of normalizedSelectors) {
|
|
444
|
+
// We are going to be apply the current rule to n selectors, so we clone the rule
|
|
445
|
+
const rule = this.cloneRule(this.rule);
|
|
446
|
+
|
|
447
|
+
if (selector.type === "className") {
|
|
448
|
+
const {
|
|
449
|
+
specificity,
|
|
450
|
+
className,
|
|
451
|
+
mediaQuery,
|
|
452
|
+
containerQuery,
|
|
453
|
+
pseudoClassesQuery,
|
|
454
|
+
attributeQuery,
|
|
455
|
+
} = selector;
|
|
456
|
+
|
|
457
|
+
if (!className) {
|
|
458
|
+
continue; // No className, nothing to do
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// Combine the specificity of the selector with the rule's specificity
|
|
462
|
+
for (let i = 0; i < specificity.length; i++) {
|
|
463
|
+
const spec = specificity[i];
|
|
464
|
+
if (!spec) continue;
|
|
465
|
+
rule.s[i] = spec + (rule.s[i] ?? 0);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
if (mediaQuery) {
|
|
469
|
+
rule.m ??= [];
|
|
470
|
+
rule.m.push(...mediaQuery);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
if (containerQuery) {
|
|
474
|
+
rule.cq ??= [];
|
|
475
|
+
rule.cq.push(...containerQuery);
|
|
476
|
+
|
|
477
|
+
for (const query of containerQuery) {
|
|
478
|
+
const name = query.n;
|
|
479
|
+
|
|
480
|
+
if (typeof name !== "string") {
|
|
481
|
+
continue;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
const [first, ...rest] = name.split(".");
|
|
485
|
+
|
|
486
|
+
if (typeof first !== "string") {
|
|
487
|
+
continue;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
const containerRule: StyleRule = {
|
|
491
|
+
// These are not "real" rules, so they use the lowest specificity
|
|
492
|
+
s: [0],
|
|
493
|
+
c: [name],
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
if (rest.length) {
|
|
497
|
+
containerRule.aq = rest.map((attr) => [
|
|
498
|
+
"a",
|
|
499
|
+
"className",
|
|
500
|
+
"*=",
|
|
501
|
+
attr,
|
|
502
|
+
]);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// Create rules for the parent classes
|
|
506
|
+
this.addRuleToRuleSet(first, containerRule);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
if (pseudoClassesQuery) {
|
|
511
|
+
rule.p = { ...rule.p, ...pseudoClassesQuery };
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
if (attributeQuery) {
|
|
515
|
+
rule.aq ??= [];
|
|
516
|
+
rule.aq.push(...attributeQuery);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
this.addRuleToRuleSet(className, rule);
|
|
520
|
+
|
|
521
|
+
const extraRulesArray = extraRules.get(this.rule);
|
|
522
|
+
if (extraRulesArray) {
|
|
523
|
+
for (const extraRule of extraRulesArray) {
|
|
524
|
+
this.addRuleToRuleSet(
|
|
525
|
+
className,
|
|
526
|
+
this.createRuleFromPartial(rule, extraRule),
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
} else {
|
|
531
|
+
// These can only have variable declarations
|
|
532
|
+
if (!this.rule.v) {
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
const { type } = selector;
|
|
536
|
+
for (const [name, value] of this.rule.v) {
|
|
537
|
+
this.shared[type] ??= {};
|
|
538
|
+
this.shared[type][name] ??= [];
|
|
539
|
+
const mediaQueries = this.rule.m;
|
|
540
|
+
const variableValue: VariableValue = mediaQueries
|
|
541
|
+
? [value, [...mediaQueries]]
|
|
542
|
+
: [value];
|
|
543
|
+
// Append extra media queries if they exist
|
|
544
|
+
this.shared[type][name].push(variableValue);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
addContainerQuery(query: ContainerQuery) {
|
|
551
|
+
this.ruleTemplate.cq ??= [];
|
|
552
|
+
this.ruleTemplate.cq.push(query);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
newAnimationFrames(name: string) {
|
|
556
|
+
this.shared.animations ??= {};
|
|
557
|
+
|
|
558
|
+
this.animationFrames = this.shared.animations[name];
|
|
559
|
+
if (!this.animationFrames) {
|
|
560
|
+
this.animationFrames = [];
|
|
561
|
+
this.shared.animations[name] = this.animationFrames;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
newAnimationFrame(progress: string) {
|
|
566
|
+
if (!this.animationFrames) {
|
|
567
|
+
throw new Error(
|
|
568
|
+
"No animation frames defined. Call newAnimationFrames first.",
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
this.animationDeclarations = [];
|
|
573
|
+
this.animationFrames.push([progress, this.animationDeclarations]);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
function isStyleFunction(
|
|
578
|
+
value: StyleDescriptor | StyleDescriptor[],
|
|
579
|
+
): value is StyleFunction {
|
|
580
|
+
return Boolean(
|
|
581
|
+
Array.isArray(value) &&
|
|
582
|
+
value.length > 0 &&
|
|
583
|
+
value[0] &&
|
|
584
|
+
typeof value[0] === "object" &&
|
|
585
|
+
Object.keys(value[0]).length === 0,
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
function postProcessStyleFunction(value: StyleDescriptor): [
|
|
590
|
+
// Should it be delayed
|
|
591
|
+
boolean,
|
|
592
|
+
// Does it use variables
|
|
593
|
+
boolean,
|
|
594
|
+
] {
|
|
595
|
+
if (!Array.isArray(value)) {
|
|
596
|
+
return [false, false];
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
if (isStyleDescriptorArray(value)) {
|
|
600
|
+
let shouldDelay = false;
|
|
601
|
+
let usesVariables = false;
|
|
602
|
+
for (const v of value) {
|
|
603
|
+
const [delayed, variables] = postProcessStyleFunction(v);
|
|
604
|
+
shouldDelay ||= delayed;
|
|
605
|
+
usesVariables ||= variables;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
return [shouldDelay, usesVariables];
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
let [shouldDelay, usesVariables] = postProcessStyleFunction(value[2]);
|
|
612
|
+
|
|
613
|
+
usesVariables ||= value[1] === "var";
|
|
614
|
+
shouldDelay ||= value[3] === 1;
|
|
615
|
+
|
|
616
|
+
if (shouldDelay) {
|
|
617
|
+
return [true, usesVariables];
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return [false, false];
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
function allEqual(...params: unknown[]) {
|
|
624
|
+
return params.every((param, index, array) => {
|
|
625
|
+
return index === 0 ? true : equal(array[0], param);
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
function equal(a: unknown, b: unknown) {
|
|
630
|
+
if (a === b) return true;
|
|
631
|
+
if (typeof a !== typeof b) return false;
|
|
632
|
+
if (a === null || b === null) return false;
|
|
633
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
634
|
+
if (a.length !== b.length) return false;
|
|
635
|
+
for (let i = 0; i < a.length; i++) {
|
|
636
|
+
if (!equal(a[i], b[i])) return false;
|
|
637
|
+
}
|
|
638
|
+
return true;
|
|
639
|
+
}
|
|
640
|
+
if (typeof a === "object" && typeof b === "object") {
|
|
641
|
+
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
642
|
+
for (const key in a) {
|
|
643
|
+
if (
|
|
644
|
+
!equal(
|
|
645
|
+
(a as Record<string, unknown>)[key],
|
|
646
|
+
(b as Record<string, unknown>)[key],
|
|
647
|
+
)
|
|
648
|
+
)
|
|
649
|
+
return false;
|
|
650
|
+
}
|
|
651
|
+
return true;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
return false;
|
|
655
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Text as RNText, type TextProps } from "react-native";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useCssElement,
|
|
5
|
+
type StyledConfiguration,
|
|
6
|
+
type StyledProps,
|
|
7
|
+
} from "../runtime";
|
|
8
|
+
|
|
9
|
+
const mapping = {
|
|
10
|
+
className: "style",
|
|
11
|
+
} satisfies StyledConfiguration<typeof RNText>;
|
|
12
|
+
|
|
13
|
+
export function Text(props: StyledProps<TextProps, typeof mapping>) {
|
|
14
|
+
return useCssElement(RNText, props, mapping);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default Text;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { View as RNView, type ViewProps } from "react-native";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useCssElement,
|
|
5
|
+
type StyledConfiguration,
|
|
6
|
+
type StyledProps,
|
|
7
|
+
} from "../runtime";
|
|
8
|
+
|
|
9
|
+
const mapping = {
|
|
10
|
+
className: "style",
|
|
11
|
+
} satisfies StyledConfiguration<typeof RNView>;
|
|
12
|
+
|
|
13
|
+
export function View(props: StyledProps<ViewProps, typeof mapping>) {
|
|
14
|
+
return useCssElement(RNView, props, mapping);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default View;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module "expect/build/matchers";
|