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,65 @@
|
|
|
1
|
+
import { Appearance, Dimensions } from "react-native";
|
|
2
|
+
|
|
3
|
+
import { inspect } from "node:util";
|
|
4
|
+
|
|
5
|
+
import { compile, type CompilerOptions } from "../compiler";
|
|
6
|
+
import { StyleCollection } from "../runtime/native/injection";
|
|
7
|
+
import { colorScheme, dimensions, rem } from "../runtime/native/reactivity";
|
|
8
|
+
|
|
9
|
+
declare global {
|
|
10
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
11
|
+
namespace jest {
|
|
12
|
+
interface Matchers<R> {
|
|
13
|
+
toHaveAnimatedStyle(style?: unknown): R;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const testID = "react-native-css";
|
|
19
|
+
|
|
20
|
+
beforeEach(() => {
|
|
21
|
+
StyleCollection.styles.clear();
|
|
22
|
+
dimensions.set(Dimensions.get("window"));
|
|
23
|
+
rem.set(14);
|
|
24
|
+
Appearance.setColorScheme(null);
|
|
25
|
+
colorScheme.set(null);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const debugDefault = Boolean(
|
|
29
|
+
process.env.REACT_NATIVE_CSS_TEST_DEBUG &&
|
|
30
|
+
process.env.NODE_OPTIONS?.includes("--inspect"),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export function registerCSS(
|
|
34
|
+
css: string,
|
|
35
|
+
{
|
|
36
|
+
debug = debugDefault,
|
|
37
|
+
...options
|
|
38
|
+
}: CompilerOptions & { debug?: boolean } = {},
|
|
39
|
+
) {
|
|
40
|
+
const logger = debug
|
|
41
|
+
? (text: string) => {
|
|
42
|
+
// Just log the rules
|
|
43
|
+
if (text.startsWith("[")) {
|
|
44
|
+
console.log(`Rules:\n---\n${text}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
: undefined;
|
|
48
|
+
|
|
49
|
+
const compiled = compile(css, { ...options, logger });
|
|
50
|
+
if (debug) {
|
|
51
|
+
console.log(
|
|
52
|
+
`Compiled:\n---\n${inspect(
|
|
53
|
+
{
|
|
54
|
+
stylesheet: compiled.stylesheet(),
|
|
55
|
+
warnings: compiled.warnings(),
|
|
56
|
+
},
|
|
57
|
+
{ depth: null, colors: true, compact: false },
|
|
58
|
+
)}`,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
StyleCollection.inject(compiled.stylesheet());
|
|
63
|
+
|
|
64
|
+
return compiled;
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// require("react-native-reanimated").setUpTests();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// import matchers from "expect/build/matchers";
|
|
2
|
+
|
|
3
|
+
// // I do not know why this is needed
|
|
4
|
+
// matchers.customTesters = [];
|
|
5
|
+
|
|
6
|
+
// expect.extend({
|
|
7
|
+
// toHaveStyle(received, style) {
|
|
8
|
+
// const receivedStyle = received?.props?.style
|
|
9
|
+
// ? Object.fromEntries(Object.entries(received?.props?.style))
|
|
10
|
+
// : undefined;
|
|
11
|
+
// return matchers.toStrictEqual(receivedStyle, style);
|
|
12
|
+
// },
|
|
13
|
+
// });
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { dirname, relative, sep } from "node:path";
|
|
3
|
+
import { versions } from "node:process";
|
|
4
|
+
|
|
5
|
+
import connect from "connect";
|
|
6
|
+
import debug from "debug";
|
|
7
|
+
import type { MetroConfig } from "metro-config";
|
|
8
|
+
|
|
9
|
+
import type { CompilerOptions, ReactNativeCssStyleSheet_V2 } from "../compiler";
|
|
10
|
+
import { compile } from "../compiler/compiler";
|
|
11
|
+
import { getNativeInjectionCode, getWebInjectionCode } from "./injection-code";
|
|
12
|
+
import { nativeResolver, webResolver } from "./resolver";
|
|
13
|
+
import { setupTypeScript } from "./typescript";
|
|
14
|
+
|
|
15
|
+
export interface WithReactNativeCSSOptions extends CompilerOptions {
|
|
16
|
+
/* Specify the path to the TypeScript environment file. Defaults types-env.d.ts */
|
|
17
|
+
typescriptEnvPath?: string;
|
|
18
|
+
/* Disable generation of the types-env.d.ts file. Defaults false */
|
|
19
|
+
disableTypeScriptGeneration?: boolean;
|
|
20
|
+
/** Add className to all React Native primitives. Defaults false */
|
|
21
|
+
globalClassNamePolyfill?: boolean;
|
|
22
|
+
hexColors?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const defaultLogger = debug("react-native-css:metro");
|
|
26
|
+
|
|
27
|
+
export function withReactNativeCSS<
|
|
28
|
+
T extends MetroConfig | (() => Promise<MetroConfig>),
|
|
29
|
+
>(config: T, options?: WithReactNativeCSSOptions): T {
|
|
30
|
+
if (typeof config === "function") {
|
|
31
|
+
return (async () => {
|
|
32
|
+
return withReactNativeCSS(await config(), options);
|
|
33
|
+
}) as T;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (Number(versions.node.split(".")[0]) < 20) {
|
|
37
|
+
throw new Error("react-native-css only supports NodeJS >20");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const {
|
|
41
|
+
disableTypeScriptGeneration,
|
|
42
|
+
typescriptEnvPath,
|
|
43
|
+
globalClassNamePolyfill = false,
|
|
44
|
+
logger = defaultLogger,
|
|
45
|
+
} = options || {};
|
|
46
|
+
|
|
47
|
+
const loggerEnabled = "enabled" in logger ? logger.enabled : true;
|
|
48
|
+
|
|
49
|
+
if (disableTypeScriptGeneration !== true) {
|
|
50
|
+
setupTypeScript(typescriptEnvPath);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const originalMiddleware = config.server?.enhanceMiddleware;
|
|
54
|
+
const originalResolver = config.resolver?.resolveRequest;
|
|
55
|
+
|
|
56
|
+
const poisonPillPath = "./poison.pill";
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
...config,
|
|
60
|
+
transformerPath: require.resolve("./metro-transformer"),
|
|
61
|
+
resolver: {
|
|
62
|
+
...config.resolver,
|
|
63
|
+
sourceExts: [...(config?.resolver?.sourceExts || []), "css"],
|
|
64
|
+
resolveRequest: (context, moduleName, platform) => {
|
|
65
|
+
if (moduleName === poisonPillPath) {
|
|
66
|
+
return { type: "empty" };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Don't hijack the resolution of react-native imports
|
|
70
|
+
if (!globalClassNamePolyfill) {
|
|
71
|
+
const parentResolver = originalResolver ?? context.resolveRequest;
|
|
72
|
+
return parentResolver(context, moduleName, platform);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const parentResolver = originalResolver ?? context.resolveRequest;
|
|
76
|
+
const resolver = platform === "web" ? webResolver : nativeResolver;
|
|
77
|
+
const resolved = resolver(
|
|
78
|
+
parentResolver,
|
|
79
|
+
context,
|
|
80
|
+
moduleName,
|
|
81
|
+
platform,
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
return resolved;
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
server: {
|
|
88
|
+
...config.server,
|
|
89
|
+
enhanceMiddleware(middleware, metroServer) {
|
|
90
|
+
const server = connect();
|
|
91
|
+
const bundler: any = metroServer.getBundler().getBundler();
|
|
92
|
+
|
|
93
|
+
if (!bundler.__react_native_css__patched) {
|
|
94
|
+
bundler.__react_native_css__patched = true;
|
|
95
|
+
|
|
96
|
+
const nativeCSSFiles = new Map<
|
|
97
|
+
string,
|
|
98
|
+
[string, ReactNativeCssStyleSheet_V2]
|
|
99
|
+
>();
|
|
100
|
+
const webCSSFiles = new Set<string>();
|
|
101
|
+
|
|
102
|
+
const nativeInjectionPath = require.resolve(
|
|
103
|
+
"../runtime/native/metro",
|
|
104
|
+
);
|
|
105
|
+
const nativeInjectionFilepaths = [
|
|
106
|
+
// CommonJS
|
|
107
|
+
nativeInjectionPath,
|
|
108
|
+
// ES Module
|
|
109
|
+
nativeInjectionPath.replace(
|
|
110
|
+
`dist${sep}commonjs`,
|
|
111
|
+
`dist${sep}module`,
|
|
112
|
+
),
|
|
113
|
+
// TypeScript
|
|
114
|
+
nativeInjectionPath
|
|
115
|
+
.replace(`dist${sep}commonjs`, `src`)
|
|
116
|
+
.replace(".js", ".ts"),
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
const webInjectionPath = require.resolve("../runtime/web/metro");
|
|
120
|
+
const webInjectionFilepaths = [
|
|
121
|
+
// CommonJS
|
|
122
|
+
webInjectionPath,
|
|
123
|
+
// ES Module
|
|
124
|
+
webInjectionPath.replace(`dist${sep}commonjs`, `dist${sep}module`),
|
|
125
|
+
// TypeScript
|
|
126
|
+
webInjectionPath
|
|
127
|
+
.replace(`dist${sep}commonjs`, `src`)
|
|
128
|
+
.replace(".js", ".ts"),
|
|
129
|
+
];
|
|
130
|
+
|
|
131
|
+
// Keep the original
|
|
132
|
+
const transformFile = bundler.transformFile.bind(bundler);
|
|
133
|
+
|
|
134
|
+
const watcher = bundler.getWatcher();
|
|
135
|
+
|
|
136
|
+
// Patch with our functionality
|
|
137
|
+
bundler.transformFile = async function (
|
|
138
|
+
filePath: string,
|
|
139
|
+
transformOptions: any,
|
|
140
|
+
fileBuffer?: Buffer,
|
|
141
|
+
) {
|
|
142
|
+
const isCss = /\.(s?css|sass)$/.test(filePath);
|
|
143
|
+
|
|
144
|
+
if (transformOptions.platform === "web") {
|
|
145
|
+
if (isCss) {
|
|
146
|
+
webCSSFiles.add(filePath);
|
|
147
|
+
} else if (webInjectionFilepaths.includes(filePath)) {
|
|
148
|
+
fileBuffer = getWebInjectionCode(Array.from(webCSSFiles));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return transformFile(filePath, transformOptions, fileBuffer);
|
|
152
|
+
} else {
|
|
153
|
+
// Handle CSS files on native platforms
|
|
154
|
+
if (isCss) {
|
|
155
|
+
const webTransform = await transformFile(
|
|
156
|
+
filePath,
|
|
157
|
+
{
|
|
158
|
+
...transformOptions,
|
|
159
|
+
// Force the platform to web for CSS files
|
|
160
|
+
platform: "web",
|
|
161
|
+
// Let the transformer know that we will handle compilation
|
|
162
|
+
customTransformOptions: {
|
|
163
|
+
...transformOptions.customTransformOptions,
|
|
164
|
+
reactNativeCSSCompile: false,
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
fileBuffer,
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
const lastTransform = nativeCSSFiles.get(filePath);
|
|
171
|
+
const last = lastTransform?.[0];
|
|
172
|
+
const next = webTransform.output[0].data.css.code.toString();
|
|
173
|
+
|
|
174
|
+
// The CSS file has changed, we need to recompile the injection file
|
|
175
|
+
if (next !== last) {
|
|
176
|
+
nativeCSSFiles.set(filePath, [
|
|
177
|
+
next,
|
|
178
|
+
compile(next, {
|
|
179
|
+
hexColors: options?.hexColors,
|
|
180
|
+
}).stylesheet(),
|
|
181
|
+
]);
|
|
182
|
+
|
|
183
|
+
watcher.emit("change", {
|
|
184
|
+
eventsQueue: nativeInjectionFilepaths.map((filePath) => ({
|
|
185
|
+
filePath,
|
|
186
|
+
metadata: {
|
|
187
|
+
modifiedTime: Date.now(),
|
|
188
|
+
size: 1, // Can be anything
|
|
189
|
+
type: "virtual", // Can be anything
|
|
190
|
+
},
|
|
191
|
+
type: "change",
|
|
192
|
+
})),
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const nativeTransform = await transformFile(
|
|
197
|
+
filePath,
|
|
198
|
+
transformOptions,
|
|
199
|
+
fileBuffer,
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
// Tell Expo to skip caching this file
|
|
203
|
+
nativeTransform.output[0].data.css = {
|
|
204
|
+
skipCache: true,
|
|
205
|
+
// Expo requires a `code` property
|
|
206
|
+
code: "",
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
return nativeTransform;
|
|
210
|
+
} else if (nativeInjectionFilepaths.includes(filePath)) {
|
|
211
|
+
// If this is the injection file, we to swap its content with the
|
|
212
|
+
// compiled CSS files
|
|
213
|
+
fileBuffer = getNativeInjectionCode(
|
|
214
|
+
Array.from(nativeCSSFiles.keys()).map((key) =>
|
|
215
|
+
relative(dirname(filePath), key),
|
|
216
|
+
),
|
|
217
|
+
Array.from(nativeCSSFiles.values()).map(([, value]) => value),
|
|
218
|
+
);
|
|
219
|
+
|
|
220
|
+
if (loggerEnabled && fileBuffer) {
|
|
221
|
+
logger(`Transformed ${filePath}`);
|
|
222
|
+
logger(fileBuffer?.toString());
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return transformFile(filePath, transformOptions, fileBuffer);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return originalMiddleware
|
|
232
|
+
? server.use(originalMiddleware(middleware, metroServer))
|
|
233
|
+
: server.use(middleware);
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a hack around Expo's handling of CSS files.
|
|
3
|
+
* When a component is inside a lazy() barrier, it is inside a different JS bundle.
|
|
4
|
+
* So when it updates, it only updates its local bundle, not the global one which contains the CSS files.
|
|
5
|
+
*
|
|
6
|
+
* To fix this, we force our code to always import the CSS files.
|
|
7
|
+
* Now the CSS files are in every bundle.
|
|
8
|
+
*
|
|
9
|
+
* We achieve this by collecting all CSS files and injecting them into a special file
|
|
10
|
+
* which is included inside react-native-css's runtime.
|
|
11
|
+
*
|
|
12
|
+
* This is why both of these function add imports for the CSS files.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export function getWebInjectionCode(filePaths: string[]) {
|
|
16
|
+
const importStatements = filePaths
|
|
17
|
+
.map((filePath) => `import "${filePath}";`)
|
|
18
|
+
.join("\n");
|
|
19
|
+
|
|
20
|
+
return Buffer.from(importStatements);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function getNativeInjectionCode(
|
|
24
|
+
cssFilePaths: string[],
|
|
25
|
+
values: unknown[],
|
|
26
|
+
) {
|
|
27
|
+
const importStatements = cssFilePaths
|
|
28
|
+
.map((filePath) => `import "${filePath}";`)
|
|
29
|
+
.join("\n");
|
|
30
|
+
const importPath = `import { StyleCollection } from "./api";`;
|
|
31
|
+
const contents = values
|
|
32
|
+
.map((value) => `StyleCollection.inject(${JSON.stringify(value)});`)
|
|
33
|
+
.join("\n");
|
|
34
|
+
|
|
35
|
+
return Buffer.from(
|
|
36
|
+
`${importStatements}\n${importPath}\n${contents};export {};`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
JsTransformerConfig,
|
|
3
|
+
JsTransformOptions,
|
|
4
|
+
TransformResponse,
|
|
5
|
+
} from "metro-transform-worker";
|
|
6
|
+
|
|
7
|
+
const worker =
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
9
|
+
require("@expo/metro-config/build/transform-worker/transform-worker.js") as typeof import("metro-transform-worker");
|
|
10
|
+
|
|
11
|
+
export function transform(
|
|
12
|
+
config: JsTransformerConfig,
|
|
13
|
+
projectRoot: string,
|
|
14
|
+
filePath: string,
|
|
15
|
+
data: Buffer,
|
|
16
|
+
options: JsTransformOptions,
|
|
17
|
+
): Promise<TransformResponse> {
|
|
18
|
+
const isCss = options.type !== "asset" && /\.(s?css|sass)$/.test(filePath);
|
|
19
|
+
const skipCompile =
|
|
20
|
+
options.customTransformOptions &&
|
|
21
|
+
"reactNativeCSSCompile" in options.customTransformOptions &&
|
|
22
|
+
options.customTransformOptions.reactNativeCSSCompile === false;
|
|
23
|
+
|
|
24
|
+
if (!isCss || skipCompile) {
|
|
25
|
+
return worker.transform(config, projectRoot, filePath, data, options);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// TODO - compile the CSS file inline
|
|
29
|
+
|
|
30
|
+
return worker.transform(config, projectRoot, filePath, data, options);
|
|
31
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// ISC License
|
|
3
|
+
|
|
4
|
+
// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
|
|
5
|
+
|
|
6
|
+
// Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
+
// purpose with or without fee is hereby granted, provided that the above
|
|
8
|
+
// copyright notice and this permission notice appear in all copies.
|
|
9
|
+
|
|
10
|
+
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
11
|
+
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
12
|
+
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
13
|
+
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
14
|
+
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
15
|
+
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
16
|
+
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
+
//
|
|
18
|
+
// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1
|
|
19
|
+
|
|
20
|
+
const { env, stdout } = globalThis?.process ?? {};
|
|
21
|
+
|
|
22
|
+
const enabled =
|
|
23
|
+
env &&
|
|
24
|
+
!env.NO_COLOR &&
|
|
25
|
+
(env.FORCE_COLOR || (stdout?.isTTY && !env.CI && env.TERM !== "dumb"));
|
|
26
|
+
|
|
27
|
+
const replaceClose = (
|
|
28
|
+
str: string,
|
|
29
|
+
close: string,
|
|
30
|
+
replace: string,
|
|
31
|
+
index: number,
|
|
32
|
+
): string => {
|
|
33
|
+
const start = str.substring(0, index) + replace;
|
|
34
|
+
const end = str.substring(index + close.length);
|
|
35
|
+
const nextIndex = end.indexOf(close);
|
|
36
|
+
return ~nextIndex
|
|
37
|
+
? start + replaceClose(end, close, replace, nextIndex)
|
|
38
|
+
: start + end;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const formatter = (open: string, close: string, replace = open) => {
|
|
42
|
+
if (!enabled) return String;
|
|
43
|
+
return (input: string) => {
|
|
44
|
+
const string = "" + input;
|
|
45
|
+
const index = string.indexOf(close, open.length);
|
|
46
|
+
return ~index
|
|
47
|
+
? open + replaceClose(string, close, replace, index) + close
|
|
48
|
+
: open + string + close;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const reset = enabled ? (s: string) => `\x1b[0m${s}\x1b[0m` : String;
|
|
53
|
+
export const bold = formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m");
|
|
54
|
+
export const dim = formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m");
|
|
55
|
+
export const italic = formatter("\x1b[3m", "\x1b[23m");
|
|
56
|
+
export const underline = formatter("\x1b[4m", "\x1b[24m");
|
|
57
|
+
export const inverse = formatter("\x1b[7m", "\x1b[27m");
|
|
58
|
+
export const hidden = formatter("\x1b[8m", "\x1b[28m");
|
|
59
|
+
export const strikethrough = formatter("\x1b[9m", "\x1b[29m");
|
|
60
|
+
export const black = formatter("\x1b[30m", "\x1b[39m");
|
|
61
|
+
export const red = formatter("\x1b[31m", "\x1b[39m");
|
|
62
|
+
export const green = formatter("\x1b[32m", "\x1b[39m");
|
|
63
|
+
export const yellow = formatter("\x1b[33m", "\x1b[39m");
|
|
64
|
+
export const blue = formatter("\x1b[34m", "\x1b[39m");
|
|
65
|
+
export const magenta = formatter("\x1b[35m", "\x1b[39m");
|
|
66
|
+
export const purple = formatter("\x1b[38;2;173;127;168m", "\x1b[39m");
|
|
67
|
+
export const cyan = formatter("\x1b[36m", "\x1b[39m");
|
|
68
|
+
export const white = formatter("\x1b[37m", "\x1b[39m");
|
|
69
|
+
export const gray = formatter("\x1b[90m", "\x1b[39m");
|
|
70
|
+
export const bgBlack = formatter("\x1b[40m", "\x1b[49m");
|
|
71
|
+
export const bgRed = formatter("\x1b[41m", "\x1b[49m");
|
|
72
|
+
export const bgGreen = formatter("\x1b[42m", "\x1b[49m");
|
|
73
|
+
export const bgYellow = formatter("\x1b[43m", "\x1b[49m");
|
|
74
|
+
export const bgBlue = formatter("\x1b[44m", "\x1b[49m");
|
|
75
|
+
export const bgMagenta = formatter("\x1b[45m", "\x1b[49m");
|
|
76
|
+
export const bgCyan = formatter("\x1b[46m", "\x1b[49m");
|
|
77
|
+
export const bgWhite = formatter("\x1b[47m", "\x1b[49m");
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { basename, resolve, sep } from "node:path";
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
CustomResolutionContext,
|
|
5
|
+
CustomResolver,
|
|
6
|
+
Resolution,
|
|
7
|
+
} from "metro-resolver";
|
|
8
|
+
|
|
9
|
+
import { allowedModules } from "../babel/allowedModules";
|
|
10
|
+
|
|
11
|
+
const thisModuleDist = resolve(__dirname, "../../../dist");
|
|
12
|
+
const thisModuleSrc = resolve(__dirname, "../../../src");
|
|
13
|
+
|
|
14
|
+
function isFromThisModule(filename: string): boolean {
|
|
15
|
+
return (
|
|
16
|
+
filename.startsWith(thisModuleDist) || filename.startsWith(thisModuleSrc)
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function nativeResolver(
|
|
21
|
+
resolver: CustomResolver,
|
|
22
|
+
context: CustomResolutionContext,
|
|
23
|
+
moduleName: string,
|
|
24
|
+
platform: string | null,
|
|
25
|
+
): Resolution {
|
|
26
|
+
const resolution = resolver(context, moduleName, platform);
|
|
27
|
+
|
|
28
|
+
if (
|
|
29
|
+
// Don't include our internal files
|
|
30
|
+
isFromThisModule(context.originModulePath) ||
|
|
31
|
+
// Only operate on source files
|
|
32
|
+
resolution.type !== "sourceFile" ||
|
|
33
|
+
// Skip the React Native barrel file to prevent infinite recursion
|
|
34
|
+
context.originModulePath.endsWith("react-native/index.js") ||
|
|
35
|
+
// Skip anything that isn't importing a React Native component
|
|
36
|
+
!(
|
|
37
|
+
moduleName.startsWith("react-native") ||
|
|
38
|
+
moduleName.startsWith("react-native/")
|
|
39
|
+
)
|
|
40
|
+
) {
|
|
41
|
+
return resolution;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (moduleName === "react-native") {
|
|
45
|
+
return resolver(context, `react-native-css/components`, platform);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// We only care about `react-native/Library/Components/<module>.js` components
|
|
49
|
+
const segments = resolution.filePath.split(sep);
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
51
|
+
const module = basename(segments.at(-1)!).split(".")[0];
|
|
52
|
+
|
|
53
|
+
if (!module || !allowedModules.has(module)) {
|
|
54
|
+
return resolution;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function webResolver(
|
|
61
|
+
resolver: CustomResolver,
|
|
62
|
+
context: CustomResolutionContext,
|
|
63
|
+
moduleName: string,
|
|
64
|
+
platform: string | null,
|
|
65
|
+
): Resolution {
|
|
66
|
+
const resolution = resolver(context, moduleName, platform);
|
|
67
|
+
|
|
68
|
+
if (
|
|
69
|
+
// Don't include our internal files
|
|
70
|
+
isFromThisModule(context.originModulePath) ||
|
|
71
|
+
// Only operate on source files
|
|
72
|
+
resolution.type !== "sourceFile" ||
|
|
73
|
+
// Skip anything that isn't importing from `react-native-web`
|
|
74
|
+
!resolution.filePath.includes(`${sep}react-native-web${sep}`)
|
|
75
|
+
) {
|
|
76
|
+
return resolution;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// We only care about `react-native-web/<segment>/<segment>/<module>/index.js` components
|
|
80
|
+
const segments = resolution.filePath.split(sep);
|
|
81
|
+
const isIndex = segments.at(-1)?.startsWith("index.");
|
|
82
|
+
const module = segments.at(-2);
|
|
83
|
+
|
|
84
|
+
if (!isIndex || !module || !allowedModules.has(module)) {
|
|
85
|
+
return resolution;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
89
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Convert a data structure to JavaScript.
|
|
4
|
+
* The output should be similar to JSON, but without the extra characters.
|
|
5
|
+
* This is simply to reduce file size in production
|
|
6
|
+
*/
|
|
7
|
+
export function stringify(data: unknown): string {
|
|
8
|
+
switch (typeof data) {
|
|
9
|
+
case "bigint":
|
|
10
|
+
case "symbol":
|
|
11
|
+
case "function":
|
|
12
|
+
throw new Error(`Cannot stringify ${typeof data}`);
|
|
13
|
+
case "string":
|
|
14
|
+
return `"${data}"`;
|
|
15
|
+
case "number":
|
|
16
|
+
// Reduce to 3 decimal places
|
|
17
|
+
return `${Math.round(data * 1000) / 1000}`;
|
|
18
|
+
case "boolean":
|
|
19
|
+
return `${data}`;
|
|
20
|
+
case "undefined":
|
|
21
|
+
// null is processed faster than undefined
|
|
22
|
+
// JSON.stringify also converts undefined to null
|
|
23
|
+
return "null";
|
|
24
|
+
case "object": {
|
|
25
|
+
if (data === null) {
|
|
26
|
+
return "null";
|
|
27
|
+
} else if (Array.isArray(data)) {
|
|
28
|
+
return `[${data
|
|
29
|
+
.map((value) => {
|
|
30
|
+
// These values can be omitted to create a holey array
|
|
31
|
+
// This is slightly slower to parse at runtime, but keeps the
|
|
32
|
+
// file size smaller
|
|
33
|
+
return value === null || value === undefined
|
|
34
|
+
? ""
|
|
35
|
+
: stringify(value);
|
|
36
|
+
})
|
|
37
|
+
.join(",")}]`;
|
|
38
|
+
} else {
|
|
39
|
+
return `{${Object.entries(data)
|
|
40
|
+
.flatMap(([key, value]) => {
|
|
41
|
+
// If an object's property is undefined or null we can just skip it
|
|
42
|
+
if (value === null || value === undefined) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Make sure we quote strings that require quotes
|
|
47
|
+
if (key.match(/[^a-zA-Z]/)) {
|
|
48
|
+
key = `"${key}"`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
value = stringify(value);
|
|
52
|
+
|
|
53
|
+
return [`${key}:${value}`];
|
|
54
|
+
})
|
|
55
|
+
.join(",")}}`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
3
|
+
|
|
4
|
+
import { CommentArray, parse, stringify } from "comment-json";
|
|
5
|
+
|
|
6
|
+
import { bold, cyan } from "./picocolors";
|
|
7
|
+
|
|
8
|
+
export function setupTypeScript(
|
|
9
|
+
envPath = "react-native-css-env.d.ts",
|
|
10
|
+
name = "react-native-css",
|
|
11
|
+
) {
|
|
12
|
+
try {
|
|
13
|
+
const ts = require("typescript");
|
|
14
|
+
if (!ts) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const configFileName = ts.findConfigFile(
|
|
19
|
+
"./",
|
|
20
|
+
ts.sys.fileExists,
|
|
21
|
+
"tsconfig.json",
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const userConfig = parse(
|
|
25
|
+
readFileSync(configFileName, {
|
|
26
|
+
encoding: "utf-8",
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
if (
|
|
31
|
+
typeof userConfig !== "object" ||
|
|
32
|
+
!userConfig ||
|
|
33
|
+
Array.isArray(userConfig)
|
|
34
|
+
) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const output: string[] = [];
|
|
39
|
+
let updatedConfig = false;
|
|
40
|
+
|
|
41
|
+
if (!existsSync(envPath)) {
|
|
42
|
+
writeFileSync(
|
|
43
|
+
envPath,
|
|
44
|
+
`/// <reference types="react-native-css/types" />
|
|
45
|
+
|
|
46
|
+
// NOTE: This file should not be edited and should be committed with your source code. It is generated by ${name}. If you need to move or disable this file, please see the documentation.`,
|
|
47
|
+
);
|
|
48
|
+
output.push(`Created ${cyan(envPath)}`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
userConfig.include ??= new CommentArray(envPath);
|
|
52
|
+
if (
|
|
53
|
+
Array.isArray(userConfig.include) &&
|
|
54
|
+
!userConfig.include.includes(envPath)
|
|
55
|
+
) {
|
|
56
|
+
userConfig.include.push(envPath);
|
|
57
|
+
updatedConfig = true;
|
|
58
|
+
output.push(
|
|
59
|
+
`Updated ${configFileName} to include the ${cyan(envPath)} file`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (updatedConfig) {
|
|
64
|
+
writeFileSync(configFileName, stringify(userConfig, null, 2));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (output.length) {
|
|
68
|
+
console.log(
|
|
69
|
+
`${cyan(bold("NativeWind"))} made the following changes to your project to support TypeScript:\n - ${output.join("\n - ")}`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
} catch {}
|
|
73
|
+
}
|