react-native-css 2.1.1 → 3.0.0-nightly.27bd5e2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE.md → LICENSE} +6 -8
- package/README.md +177 -70
- package/dist/commonjs/babel/allowedModules.js +23 -0
- package/dist/commonjs/babel/allowedModules.js.map +1 -0
- package/dist/commonjs/babel/helpers.js +25 -0
- package/dist/commonjs/babel/helpers.js.map +1 -0
- package/dist/commonjs/babel/import-plugin.js +101 -0
- package/dist/commonjs/babel/import-plugin.js.map +1 -0
- package/dist/commonjs/babel/index.js +9 -0
- package/dist/commonjs/babel/index.js.map +1 -0
- package/dist/commonjs/babel/react-native-web.js +118 -0
- package/dist/commonjs/babel/react-native-web.js.map +1 -0
- package/dist/commonjs/babel/react-native.js +118 -0
- package/dist/commonjs/babel/react-native.js.map +1 -0
- package/dist/commonjs/compiler/atRules.js +101 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -0
- package/dist/commonjs/compiler/attributes.test.js +20 -0
- package/dist/commonjs/compiler/attributes.test.js.map +1 -0
- package/dist/commonjs/compiler/compiler.js +235 -0
- package/dist/commonjs/compiler/compiler.js.map +1 -0
- package/dist/commonjs/compiler/compiler.types.js +4 -0
- package/dist/commonjs/compiler/compiler.types.js.map +1 -0
- package/dist/commonjs/compiler/container-query.js +63 -0
- package/dist/commonjs/compiler/container-query.js.map +1 -0
- package/dist/commonjs/compiler/declarations.js +2088 -0
- package/dist/commonjs/compiler/declarations.js.map +1 -0
- package/dist/commonjs/compiler/functions-web.js +44 -0
- package/dist/commonjs/compiler/functions-web.js.map +1 -0
- package/dist/commonjs/compiler/functions.js +59 -0
- package/dist/commonjs/compiler/functions.js.map +1 -0
- package/dist/commonjs/compiler/index.js +17 -0
- package/dist/commonjs/compiler/index.js.map +1 -0
- package/dist/commonjs/compiler/inheritance.test.js +78 -0
- package/dist/commonjs/compiler/inheritance.test.js.map +1 -0
- package/dist/commonjs/compiler/keyframes.js +60 -0
- package/dist/commonjs/compiler/keyframes.js.map +1 -0
- package/dist/commonjs/compiler/media-query.js +172 -0
- package/dist/commonjs/compiler/media-query.js.map +1 -0
- package/dist/commonjs/compiler/selectors.js +410 -0
- package/dist/commonjs/compiler/selectors.js.map +1 -0
- package/dist/commonjs/compiler/split-by-delimiter.js +21 -0
- package/dist/commonjs/compiler/split-by-delimiter.js.map +1 -0
- package/dist/commonjs/compiler/stylesheet.js +374 -0
- package/dist/commonjs/compiler/stylesheet.js.map +1 -0
- package/dist/commonjs/components/Text.js +17 -0
- package/dist/commonjs/components/Text.js.map +1 -0
- package/dist/commonjs/components/View.js +17 -0
- package/dist/commonjs/components/View.js.map +1 -0
- package/dist/commonjs/components/index.js +36 -0
- package/dist/commonjs/components/index.js.map +1 -0
- package/dist/commonjs/doctor/index.js +6 -0
- package/dist/commonjs/doctor/index.js.map +1 -0
- package/dist/commonjs/index.js +28 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/jest/expect.d.js +2 -0
- package/dist/commonjs/jest/expect.d.js.map +1 -0
- package/dist/commonjs/jest/index.js +50 -0
- package/dist/commonjs/jest/index.js.map +1 -0
- package/dist/commonjs/jest/setup.js +3 -0
- package/dist/commonjs/jest/setup.js.map +1 -0
- package/dist/commonjs/jest/setupAfterEnv.js +15 -0
- package/dist/commonjs/jest/setupAfterEnv.js.map +1 -0
- package/dist/commonjs/metro/index.js +165 -0
- package/dist/commonjs/metro/index.js.map +1 -0
- package/dist/commonjs/metro/injection-code.js +32 -0
- package/dist/commonjs/metro/injection-code.js.map +1 -0
- package/dist/commonjs/metro/metro-transformer.js +21 -0
- package/dist/commonjs/metro/metro-transformer.js.map +1 -0
- package/dist/commonjs/metro/picocolors.js +71 -0
- package/dist/commonjs/metro/picocolors.js.map +1 -0
- package/dist/commonjs/metro/resolver.js +62 -0
- package/dist/commonjs/metro/resolver.js.map +1 -0
- package/dist/commonjs/metro/stringify.js +59 -0
- package/dist/commonjs/metro/stringify.js.map +1 -0
- package/dist/commonjs/metro/typescript.js +47 -0
- package/dist/commonjs/metro/typescript.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/poison.pill.js +36 -0
- package/dist/commonjs/poison.pill.js.map +1 -0
- package/dist/commonjs/runtime/index.js +17 -0
- package/dist/commonjs/runtime/index.js.map +1 -0
- package/dist/commonjs/runtime/native/api.js +90 -0
- package/dist/commonjs/runtime/native/api.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js +116 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/guards.js +33 -0
- package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/index.js +74 -0
- package/dist/commonjs/runtime/native/conditions/index.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js +93 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/commonjs/runtime/native/index.js +28 -0
- package/dist/commonjs/runtime/native/index.js.map +1 -0
- package/dist/commonjs/runtime/native/injection.js +98 -0
- package/dist/commonjs/runtime/native/injection.js.map +1 -0
- package/dist/commonjs/runtime/native/metro.js +6 -0
- package/dist/commonjs/runtime/native/metro.js.map +1 -0
- package/dist/commonjs/runtime/native/react/interaction.js +63 -0
- package/dist/commonjs/runtime/native/react/interaction.js.map +1 -0
- package/dist/commonjs/runtime/native/react/rules.js +253 -0
- package/dist/commonjs/runtime/native/react/rules.js.map +1 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js +158 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js +50 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/commonjs/runtime/native/reactivity.js +189 -0
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/animation.js +88 -0
- package/dist/commonjs/runtime/native/styles/animation.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/border.js +12 -0
- package/dist/commonjs/runtime/native/styles/border.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js +40 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calc.js +85 -0
- package/dist/commonjs/runtime/native/styles/calc.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js +123 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/constants.js +9 -0
- package/dist/commonjs/runtime/native/styles/constants.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/defaults.js +69 -0
- package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/filters.js +84 -0
- package/dist/commonjs/runtime/native/styles/filters.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/index.js +115 -0
- package/dist/commonjs/runtime/native/styles/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/platform-functions.js +46 -0
- package/dist/commonjs/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +129 -0
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthand.js +79 -0
- package/dist/commonjs/runtime/native/styles/shorthand.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/text-shadow.js +13 -0
- package/dist/commonjs/runtime/native/styles/text-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/transform.js +23 -0
- package/dist/commonjs/runtime/native/styles/transform.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/units.js +49 -0
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/variables.js +78 -0
- package/dist/commonjs/runtime/native/styles/variables.js.map +1 -0
- package/dist/commonjs/runtime/runtime.js +17 -0
- package/dist/commonjs/runtime/runtime.js.map +1 -0
- package/dist/commonjs/runtime/runtime.native.js +17 -0
- package/dist/commonjs/runtime/runtime.native.js.map +1 -0
- package/dist/commonjs/runtime/runtime.types.js +6 -0
- package/dist/commonjs/runtime/runtime.types.js.map +1 -0
- package/dist/commonjs/runtime/utils/components.js +18 -0
- package/dist/commonjs/runtime/utils/components.js.map +1 -0
- package/dist/commonjs/runtime/utils/dot-notation.types.js +2 -0
- package/dist/commonjs/runtime/utils/dot-notation.types.js.map +1 -0
- package/dist/commonjs/runtime/utils/index.js +61 -0
- package/dist/commonjs/runtime/utils/index.js.map +1 -0
- package/dist/commonjs/runtime/utils/objects.js +84 -0
- package/dist/commonjs/runtime/utils/objects.js.map +1 -0
- package/dist/commonjs/runtime/utils/specificity.js +43 -0
- package/dist/commonjs/runtime/utils/specificity.js.map +1 -0
- package/dist/commonjs/runtime/utils/style-value.js +21 -0
- package/dist/commonjs/runtime/utils/style-value.js.map +1 -0
- package/dist/commonjs/runtime/utils/utils.types.js +6 -0
- package/dist/commonjs/runtime/utils/utils.types.js.map +1 -0
- package/dist/commonjs/runtime/web/api.js +68 -0
- package/dist/commonjs/runtime/web/api.js.map +1 -0
- package/dist/commonjs/runtime/web/assign-style.js +27 -0
- package/dist/commonjs/runtime/web/assign-style.js.map +1 -0
- package/dist/commonjs/runtime/web/index.js +18 -0
- package/dist/commonjs/runtime/web/index.js.map +1 -0
- package/dist/commonjs/runtime/web/metro.js +6 -0
- package/dist/commonjs/runtime/web/metro.js.map +1 -0
- package/dist/module/babel/allowedModules.js +19 -0
- package/dist/module/babel/allowedModules.js.map +1 -0
- package/dist/module/babel/helpers.js +21 -0
- package/dist/module/babel/helpers.js.map +1 -0
- package/dist/module/babel/import-plugin.js +97 -0
- package/dist/module/babel/import-plugin.js.map +1 -0
- package/dist/module/babel/index.js +9 -0
- package/dist/module/babel/index.js.map +1 -0
- package/dist/module/babel/react-native-web.js +112 -0
- package/dist/module/babel/react-native-web.js.map +1 -0
- package/dist/module/babel/react-native.js +112 -0
- package/dist/module/babel/react-native.js.map +1 -0
- package/dist/module/compiler/atRules.js +97 -0
- package/dist/module/compiler/atRules.js.map +1 -0
- package/dist/module/compiler/attributes.test.js +20 -0
- package/dist/module/compiler/attributes.test.js.map +1 -0
- package/dist/module/compiler/compiler.js +230 -0
- package/dist/module/compiler/compiler.js.map +1 -0
- package/dist/module/compiler/compiler.types.js +60 -0
- package/dist/module/compiler/compiler.types.js.map +1 -0
- package/dist/module/compiler/container-query.js +59 -0
- package/dist/module/compiler/container-query.js.map +1 -0
- package/dist/module/compiler/declarations.js +2014 -0
- package/dist/module/compiler/declarations.js.map +1 -0
- package/dist/module/compiler/functions-web.js +32 -0
- package/dist/module/compiler/functions-web.js.map +1 -0
- package/dist/module/compiler/functions.js +47 -0
- package/dist/module/compiler/functions.js.map +1 -0
- package/dist/module/compiler/index.js +9 -0
- package/dist/module/compiler/index.js.map +1 -0
- package/dist/module/compiler/inheritance.test.js +78 -0
- package/dist/module/compiler/inheritance.test.js.map +1 -0
- package/dist/module/compiler/keyframes.js +54 -0
- package/dist/module/compiler/keyframes.js.map +1 -0
- package/dist/module/compiler/media-query.js +166 -0
- package/dist/module/compiler/media-query.js.map +1 -0
- package/dist/module/compiler/selectors.js +405 -0
- package/dist/module/compiler/selectors.js.map +1 -0
- package/dist/module/compiler/split-by-delimiter.js +17 -0
- package/dist/module/compiler/split-by-delimiter.js.map +1 -0
- package/dist/module/compiler/stylesheet.js +369 -0
- package/dist/module/compiler/stylesheet.js.map +1 -0
- package/dist/module/components/Text.js +12 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/View.js +12 -0
- package/dist/module/components/View.js.map +1 -0
- package/dist/module/components/index.js +6 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/doctor/index.js +4 -0
- package/dist/module/doctor/index.js.map +1 -0
- package/dist/module/index.js +5 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/jest/expect.d.js +2 -0
- package/dist/module/jest/expect.d.js.map +1 -0
- package/dist/module/jest/index.js +29 -0
- package/dist/module/jest/index.js.map +1 -0
- package/dist/module/jest/setup.js +3 -0
- package/dist/module/jest/setup.js.map +1 -0
- package/dist/module/jest/setupAfterEnv.js +15 -0
- package/dist/module/jest/setupAfterEnv.js.map +1 -0
- package/dist/module/metro/index.js +159 -0
- package/dist/module/metro/index.js.map +1 -0
- package/dist/module/metro/injection-code.js +27 -0
- package/dist/module/metro/injection-code.js.map +1 -0
- package/dist/module/metro/metro-transformer.js +17 -0
- package/dist/module/metro/metro-transformer.js.map +1 -0
- package/dist/module/metro/picocolors.js +67 -0
- package/dist/module/metro/picocolors.js.map +1 -0
- package/dist/module/metro/resolver.js +57 -0
- package/dist/module/metro/resolver.js.map +1 -0
- package/dist/module/metro/stringify.js +55 -0
- package/dist/module/metro/stringify.js.map +1 -0
- package/dist/module/metro/typescript.js +42 -0
- package/dist/module/metro/typescript.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/poison.pill.js +34 -0
- package/dist/module/poison.pill.js.map +1 -0
- package/dist/module/runtime/index.js +9 -0
- package/dist/module/runtime/index.js.map +1 -0
- package/dist/module/runtime/native/api.js +75 -0
- package/dist/module/runtime/native/api.js.map +1 -0
- package/dist/module/runtime/native/conditions/container-query.js +110 -0
- package/dist/module/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/module/runtime/native/conditions/guards.js +29 -0
- package/dist/module/runtime/native/conditions/guards.js.map +1 -0
- package/dist/module/runtime/native/conditions/index.js +70 -0
- package/dist/module/runtime/native/conditions/index.js.map +1 -0
- package/dist/module/runtime/native/conditions/media-query.js +88 -0
- package/dist/module/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/module/runtime/native/index.js +5 -0
- package/dist/module/runtime/native/index.js.map +1 -0
- package/dist/module/runtime/native/injection.js +93 -0
- package/dist/module/runtime/native/injection.js.map +1 -0
- package/dist/module/runtime/native/metro.js +5 -0
- package/dist/module/runtime/native/metro.js.map +1 -0
- package/dist/module/runtime/native/react/interaction.js +59 -0
- package/dist/module/runtime/native/react/interaction.js.map +1 -0
- package/dist/module/runtime/native/react/rules.js +246 -0
- package/dist/module/runtime/native/react/rules.js.map +1 -0
- package/dist/module/runtime/native/react/useNativeCss.js +152 -0
- package/dist/module/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/module/runtime/native/react/usePassthrough.js +45 -0
- package/dist/module/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/module/runtime/native/reactivity.js +177 -0
- package/dist/module/runtime/native/reactivity.js.map +1 -0
- package/dist/module/runtime/native/styles/animation.js +82 -0
- package/dist/module/runtime/native/styles/animation.js.map +1 -0
- package/dist/module/runtime/native/styles/border.js +8 -0
- package/dist/module/runtime/native/styles/border.js.map +1 -0
- package/dist/module/runtime/native/styles/box-shadow.js +35 -0
- package/dist/module/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/calc.js +79 -0
- package/dist/module/runtime/native/styles/calc.js.map +1 -0
- package/dist/module/runtime/native/styles/calculate-props.js +118 -0
- package/dist/module/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/module/runtime/native/styles/constants.js +5 -0
- package/dist/module/runtime/native/styles/constants.js.map +1 -0
- package/dist/module/runtime/native/styles/defaults.js +65 -0
- package/dist/module/runtime/native/styles/defaults.js.map +1 -0
- package/dist/module/runtime/native/styles/filters.js +70 -0
- package/dist/module/runtime/native/styles/filters.js.map +1 -0
- package/dist/module/runtime/native/styles/index.js +110 -0
- package/dist/module/runtime/native/styles/index.js.map +1 -0
- package/dist/module/runtime/native/styles/platform-functions.js +36 -0
- package/dist/module/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +125 -0
- package/dist/module/runtime/native/styles/resolve.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthand.js +74 -0
- package/dist/module/runtime/native/styles/shorthand.js.map +1 -0
- package/dist/module/runtime/native/styles/text-shadow.js +9 -0
- package/dist/module/runtime/native/styles/text-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/transform.js +18 -0
- package/dist/module/runtime/native/styles/transform.js.map +1 -0
- package/dist/module/runtime/native/styles/units.js +40 -0
- package/dist/module/runtime/native/styles/units.js.map +1 -0
- package/dist/module/runtime/native/styles/variables.js +74 -0
- package/dist/module/runtime/native/styles/variables.js.map +1 -0
- package/dist/module/runtime/runtime.js +4 -0
- package/dist/module/runtime/runtime.js.map +1 -0
- package/dist/module/runtime/runtime.native.js +4 -0
- package/dist/module/runtime/runtime.native.js.map +1 -0
- package/dist/module/runtime/runtime.types.js +4 -0
- package/dist/module/runtime/runtime.types.js.map +1 -0
- package/dist/module/runtime/utils/components.js +14 -0
- package/dist/module/runtime/utils/components.js.map +1 -0
- package/dist/module/runtime/utils/dot-notation.types.js +2 -0
- package/dist/module/runtime/utils/dot-notation.types.js.map +1 -0
- package/dist/module/runtime/utils/index.js +8 -0
- package/dist/module/runtime/utils/index.js.map +1 -0
- package/dist/module/runtime/utils/objects.js +76 -0
- package/dist/module/runtime/utils/objects.js.map +1 -0
- package/dist/module/runtime/utils/specificity.js +38 -0
- package/dist/module/runtime/utils/specificity.js.map +1 -0
- package/dist/module/runtime/utils/style-value.js +16 -0
- package/dist/module/runtime/utils/style-value.js.map +1 -0
- package/dist/module/runtime/utils/utils.types.js +4 -0
- package/dist/module/runtime/utils/utils.types.js.map +1 -0
- package/dist/module/runtime/web/api.js +59 -0
- package/dist/module/runtime/web/api.js.map +1 -0
- package/dist/module/runtime/web/assign-style.js +23 -0
- package/dist/module/runtime/web/assign-style.js.map +1 -0
- package/dist/module/runtime/web/index.js +6 -0
- package/dist/module/runtime/web/index.js.map +1 -0
- package/dist/module/runtime/web/metro.js +5 -0
- package/dist/module/runtime/web/metro.js.map +1 -0
- package/dist/typescript/commonjs/example/src/App.d.ts +3 -0
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +10 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +198 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +121 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts +23 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +50 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/View.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/doctor/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/doctor/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/index.d.ts +3 -0
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts +14 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts +11 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts +16 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts +2 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +37 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +63 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +9 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts +12 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts +11 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/runtime.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts +47 -0
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts +23 -0
- package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +12 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts.map +1 -0
- package/dist/typescript/module/example/src/App.d.ts +3 -0
- package/dist/typescript/module/example/src/App.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/index.d.ts +1 -0
- package/dist/typescript/module/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/attributes.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts +10 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +198 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts +121 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/index.d.ts +7 -0
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts +23 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts +2 -0
- package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +50 -0
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Text.d.ts +8 -0
- package/dist/typescript/module/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/module/src/components/View.d.ts +8 -0
- package/dist/typescript/module/src/components/View.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +4 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -0
- package/dist/typescript/module/src/doctor/index.d.ts +2 -0
- package/dist/typescript/module/src/doctor/index.d.ts.map +1 -0
- package/dist/typescript/module/src/index.d.ts +3 -0
- package/dist/typescript/module/src/index.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/index.d.ts +14 -0
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +11 -0
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts +16 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/module/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/module/src/poison.pill.d.ts +2 -0
- package/dist/typescript/module/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/index.d.ts +7 -0
- package/dist/typescript/module/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +37 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +63 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +9 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts +12 -0
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts +11 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.d.ts +2 -0
- package/dist/typescript/module/src/runtime/runtime.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.native.d.ts +2 -0
- package/dist/typescript/module/src/runtime/runtime.native.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.types.d.ts +47 -0
- package/dist/typescript/module/src/runtime/runtime.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/components.d.ts +2 -0
- package/dist/typescript/module/src/runtime/utils/components.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts +23 -0
- package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/utils/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/objects.d.ts +5 -0
- package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts +12 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts.map +1 -0
- package/package.json +222 -45
- package/src/babel/allowedModules.ts +24 -0
- package/src/babel/helpers.ts +40 -0
- package/src/babel/import-plugin.ts +176 -0
- package/src/babel/index.ts +9 -0
- package/src/babel/react-native-web.ts +226 -0
- package/src/babel/react-native.ts +226 -0
- package/src/compiler/atRules.ts +144 -0
- package/src/compiler/attributes.test.ts +28 -0
- package/src/compiler/compiler.ts +268 -0
- package/src/compiler/compiler.types.ts +267 -0
- package/src/compiler/container-query.ts +97 -0
- package/src/compiler/declarations.ts +2964 -0
- package/src/compiler/functions-web.ts +44 -0
- package/src/compiler/functions.ts +64 -0
- package/src/compiler/index.ts +7 -0
- package/src/compiler/inheritance.test.ts +121 -0
- package/src/compiler/keyframes.ts +86 -0
- package/src/compiler/media-query.ts +251 -0
- package/src/compiler/selectors.ts +491 -0
- package/src/compiler/split-by-delimiter.ts +19 -0
- package/src/compiler/stylesheet.ts +528 -0
- package/src/components/Text.tsx +17 -0
- package/src/components/View.tsx +17 -0
- package/src/components/index.tsx +4 -0
- package/src/doctor/index.ts +1 -0
- package/src/index.ts +3 -0
- package/src/jest/expect.d.ts +1 -0
- package/src/jest/index.ts +42 -0
- package/src/jest/setup.ts +1 -0
- package/src/jest/setupAfterEnv.ts +13 -0
- package/src/metro/index.ts +231 -0
- package/src/metro/injection-code.ts +38 -0
- package/src/metro/metro-transformer.ts +31 -0
- package/src/metro/picocolors.ts +77 -0
- package/src/metro/resolver.ts +89 -0
- package/src/metro/stringify.ts +59 -0
- package/src/metro/typescript.ts +73 -0
- package/src/poison.pill.ts +32 -0
- package/src/runtime/index.ts +7 -0
- package/src/runtime/native/api.ts +106 -0
- package/src/runtime/native/conditions/container-query.ts +157 -0
- package/src/runtime/native/conditions/guards.ts +45 -0
- package/src/runtime/native/conditions/index.ts +106 -0
- package/src/runtime/native/conditions/media-query.ts +94 -0
- package/src/runtime/native/index.ts +4 -0
- package/src/runtime/native/injection.ts +131 -0
- package/src/runtime/native/metro.ts +2 -0
- package/src/runtime/native/react/interaction.ts +90 -0
- package/src/runtime/native/react/rules.ts +326 -0
- package/src/runtime/native/react/useNativeCss.ts +200 -0
- package/src/runtime/native/react/usePassthrough.ts +51 -0
- package/src/runtime/native/reactivity.ts +262 -0
- package/src/runtime/native/styles/animation.ts +181 -0
- package/src/runtime/native/styles/border.ts +10 -0
- package/src/runtime/native/styles/box-shadow.ts +54 -0
- package/src/runtime/native/styles/calc.ts +97 -0
- package/src/runtime/native/styles/calculate-props.ts +165 -0
- package/src/runtime/native/styles/constants.ts +2 -0
- package/src/runtime/native/styles/defaults.ts +78 -0
- package/src/runtime/native/styles/filters.ts +98 -0
- package/src/runtime/native/styles/index.ts +197 -0
- package/src/runtime/native/styles/platform-functions.ts +50 -0
- package/src/runtime/native/styles/resolve.ts +205 -0
- package/src/runtime/native/styles/shorthand.ts +121 -0
- package/src/runtime/native/styles/text-shadow.ts +17 -0
- package/src/runtime/native/styles/transform.ts +21 -0
- package/src/runtime/native/styles/units.ts +53 -0
- package/src/runtime/native/styles/variables.ts +88 -0
- package/src/runtime/runtime.native.ts +1 -0
- package/src/runtime/runtime.ts +1 -0
- package/src/runtime/runtime.types.ts +130 -0
- package/src/runtime/utils/components.ts +15 -0
- package/src/runtime/utils/dot-notation.types.ts +118 -0
- package/src/runtime/utils/index.ts +5 -0
- package/src/runtime/utils/objects.ts +97 -0
- package/src/runtime/utils/specificity.ts +44 -0
- package/src/runtime/utils/style-value.ts +24 -0
- package/src/runtime/utils/utils.types.ts +19 -0
- package/src/runtime/web/api.ts +88 -0
- package/src/runtime/web/assign-style.ts +26 -0
- package/src/runtime/web/index.ts +5 -0
- package/src/runtime/web/metro.ts +2 -0
- package/.babelrc +0 -8
- package/.editorconfig +0 -17
- package/.eslintignore +0 -3
- package/.eslintrc +0 -39
- package/.npmignore +0 -7
- package/build/index.js +0 -294
- package/build/utils.js +0 -54
- package/circle.yml +0 -31
- package/jsconfig.json +0 -9
- package/login.sh +0 -11
- package/src/index.js +0 -184
- package/src/utils.js +0 -32
- package/test/rnc.test.js +0 -258
- package/yarn.lock +0 -3333
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { dirname, relative, sep } from "node:path";
|
|
5
|
+
import { versions } from "node:process";
|
|
6
|
+
import connect from "connect";
|
|
7
|
+
import debug from "debug";
|
|
8
|
+
import { compile } from "../compiler/compiler.js";
|
|
9
|
+
import { getNativeInjectionCode, getWebInjectionCode } from "./injection-code.js";
|
|
10
|
+
import { nativeResolver, webResolver } from "./resolver.js";
|
|
11
|
+
import { setupTypeScript } from "./typescript.js";
|
|
12
|
+
const defaultLogger = debug("react-native-css:metro");
|
|
13
|
+
export function withReactNativeCSS(config, options) {
|
|
14
|
+
if (typeof config === "function") {
|
|
15
|
+
return async () => {
|
|
16
|
+
return withReactNativeCSS(await config(), options);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (Number(versions.node.split(".")[0]) < 20) {
|
|
20
|
+
throw new Error("react-native-css only supports NodeJS >20");
|
|
21
|
+
}
|
|
22
|
+
const {
|
|
23
|
+
disableTypeScriptGeneration,
|
|
24
|
+
typescriptEnvPath,
|
|
25
|
+
globalClassNamePolyfill = false
|
|
26
|
+
} = options || {};
|
|
27
|
+
if (disableTypeScriptGeneration !== true) {
|
|
28
|
+
setupTypeScript(typescriptEnvPath);
|
|
29
|
+
}
|
|
30
|
+
const originalMiddleware = config.server?.enhanceMiddleware;
|
|
31
|
+
const originalResolver = config.resolver?.resolveRequest;
|
|
32
|
+
const poisonPillPath = "./poison.pill";
|
|
33
|
+
return {
|
|
34
|
+
...config,
|
|
35
|
+
transformerPath: require.resolve("./metro-transformer"),
|
|
36
|
+
resolver: {
|
|
37
|
+
...config.resolver,
|
|
38
|
+
sourceExts: [...(config?.resolver?.sourceExts || []), "css"],
|
|
39
|
+
resolveRequest: (context, moduleName, platform) => {
|
|
40
|
+
if (moduleName === poisonPillPath) {
|
|
41
|
+
return {
|
|
42
|
+
type: "empty"
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Don't hijack the resolution of react-native imports
|
|
47
|
+
if (!globalClassNamePolyfill) {
|
|
48
|
+
const parentResolver = originalResolver ?? context.resolveRequest;
|
|
49
|
+
return parentResolver(context, moduleName, platform);
|
|
50
|
+
}
|
|
51
|
+
const parentResolver = originalResolver ?? context.resolveRequest;
|
|
52
|
+
const resolver = platform === "web" ? webResolver : nativeResolver;
|
|
53
|
+
const resolved = resolver(parentResolver, context, moduleName, platform);
|
|
54
|
+
return resolved;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
server: {
|
|
58
|
+
...config.server,
|
|
59
|
+
enhanceMiddleware(middleware, metroServer) {
|
|
60
|
+
const server = connect();
|
|
61
|
+
const bundler = metroServer.getBundler().getBundler();
|
|
62
|
+
if (!bundler.__react_native_css__patched) {
|
|
63
|
+
bundler.__react_native_css__patched = true;
|
|
64
|
+
const nativeCSSFiles = new Map();
|
|
65
|
+
const webCSSFiles = new Set();
|
|
66
|
+
const nativeInjectionPath = require.resolve("../runtime/native/metro");
|
|
67
|
+
const nativeInjectionFilepaths = [
|
|
68
|
+
// CommonJS
|
|
69
|
+
nativeInjectionPath,
|
|
70
|
+
// ES Module
|
|
71
|
+
nativeInjectionPath.replace(`dist${sep}commonjs`, `dist${sep}module`),
|
|
72
|
+
// TypeScript
|
|
73
|
+
nativeInjectionPath.replace(`dist${sep}commonjs`, `src`).replace(".js", ".ts")];
|
|
74
|
+
const webInjectionPath = require.resolve("../runtime/web/metro");
|
|
75
|
+
const webInjectionFilepaths = [
|
|
76
|
+
// CommonJS
|
|
77
|
+
webInjectionPath,
|
|
78
|
+
// ES Module
|
|
79
|
+
webInjectionPath.replace(`dist${sep}commonjs`, `dist${sep}module`),
|
|
80
|
+
// TypeScript
|
|
81
|
+
webInjectionPath.replace(`dist${sep}commonjs`, `src`).replace(".js", ".ts")];
|
|
82
|
+
|
|
83
|
+
// Keep the original
|
|
84
|
+
const transformFile = bundler.transformFile.bind(bundler);
|
|
85
|
+
const watcher = bundler.getWatcher();
|
|
86
|
+
|
|
87
|
+
// Patch with our functionality
|
|
88
|
+
bundler.transformFile = async function (filePath, transformOptions, fileBuffer) {
|
|
89
|
+
const isCss = /\.(s?css|sass)$/.test(filePath);
|
|
90
|
+
if (transformOptions.platform === "web") {
|
|
91
|
+
if (isCss) {
|
|
92
|
+
webCSSFiles.add(filePath);
|
|
93
|
+
} else if (webInjectionFilepaths.includes(filePath)) {
|
|
94
|
+
fileBuffer = getWebInjectionCode(Array.from(webCSSFiles));
|
|
95
|
+
}
|
|
96
|
+
return transformFile(filePath, transformOptions, fileBuffer);
|
|
97
|
+
} else {
|
|
98
|
+
// Handle CSS files on native platforms
|
|
99
|
+
if (isCss) {
|
|
100
|
+
const webTransform = await transformFile(filePath, {
|
|
101
|
+
...transformOptions,
|
|
102
|
+
// Force the platform to web for CSS files
|
|
103
|
+
platform: "web",
|
|
104
|
+
// Let the transformer know that we will handle compilation
|
|
105
|
+
customTransformOptions: {
|
|
106
|
+
...transformOptions.customTransformOptions,
|
|
107
|
+
reactNativeCSSCompile: false
|
|
108
|
+
}
|
|
109
|
+
}, fileBuffer);
|
|
110
|
+
const lastTransform = nativeCSSFiles.get(filePath);
|
|
111
|
+
const last = lastTransform?.[0];
|
|
112
|
+
const next = webTransform.output[0].data.css.code.toString();
|
|
113
|
+
|
|
114
|
+
// The CSS file has changed, we need to recompile the injection file
|
|
115
|
+
if (next !== last) {
|
|
116
|
+
nativeCSSFiles.set(filePath, [next, compile(next, {
|
|
117
|
+
hexColors: options?.hexColors
|
|
118
|
+
})]);
|
|
119
|
+
watcher.emit("change", {
|
|
120
|
+
eventsQueue: nativeInjectionFilepaths.map(filePath => ({
|
|
121
|
+
filePath,
|
|
122
|
+
metadata: {
|
|
123
|
+
modifiedTime: Date.now(),
|
|
124
|
+
size: 1,
|
|
125
|
+
// Can be anything
|
|
126
|
+
type: "virtual" // Can be anything
|
|
127
|
+
},
|
|
128
|
+
type: "change"
|
|
129
|
+
}))
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
const nativeTransform = await transformFile(filePath, transformOptions, fileBuffer);
|
|
133
|
+
|
|
134
|
+
// Tell Expo to skip caching this file
|
|
135
|
+
nativeTransform.output[0].data.css = {
|
|
136
|
+
skipCache: true,
|
|
137
|
+
// Expo requires a `code` property
|
|
138
|
+
code: ""
|
|
139
|
+
};
|
|
140
|
+
return nativeTransform;
|
|
141
|
+
} else if (nativeInjectionFilepaths.includes(filePath)) {
|
|
142
|
+
// If this is the injection file, we to swap its content with the
|
|
143
|
+
// compiled CSS files
|
|
144
|
+
fileBuffer = getNativeInjectionCode(Array.from(nativeCSSFiles.keys()).map(key => relative(dirname(filePath), key)), Array.from(nativeCSSFiles.values()).map(([, value]) => value));
|
|
145
|
+
if (defaultLogger.enabled && fileBuffer) {
|
|
146
|
+
defaultLogger(`Transformed ${filePath}`);
|
|
147
|
+
defaultLogger(fileBuffer?.toString());
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return transformFile(filePath, transformOptions, fileBuffer);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
return originalMiddleware ? server.use(originalMiddleware(middleware, metroServer)) : server.use(middleware);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dirname","relative","sep","versions","connect","debug","compile","getNativeInjectionCode","getWebInjectionCode","nativeResolver","webResolver","setupTypeScript","defaultLogger","withReactNativeCSS","config","options","Number","node","split","Error","disableTypeScriptGeneration","typescriptEnvPath","globalClassNamePolyfill","originalMiddleware","server","enhanceMiddleware","originalResolver","resolver","resolveRequest","poisonPillPath","transformerPath","require","resolve","sourceExts","context","moduleName","platform","type","parentResolver","resolved","middleware","metroServer","bundler","getBundler","__react_native_css__patched","nativeCSSFiles","Map","webCSSFiles","Set","nativeInjectionPath","nativeInjectionFilepaths","replace","webInjectionPath","webInjectionFilepaths","transformFile","bind","watcher","getWatcher","filePath","transformOptions","fileBuffer","isCss","test","add","includes","Array","from","webTransform","customTransformOptions","reactNativeCSSCompile","lastTransform","get","last","next","output","data","css","code","toString","set","hexColors","emit","eventsQueue","map","metadata","modifiedTime","Date","now","size","nativeTransform","skipCache","keys","key","values","value","enabled","use"],"sourceRoot":"../../../src","sources":["metro/index.ts"],"mappings":";;AAAA;AACA,SAASA,OAAO,EAAEC,QAAQ,EAAEC,GAAG,QAAQ,WAAW;AAClD,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,OAAO,MAAM,SAAS;AAC7B,OAAOC,KAAK,MAAM,OAAO;AAIzB,SAASC,OAAO,QAAQ,yBAAsB;AAC9C,SAASC,sBAAsB,EAAEC,mBAAmB,QAAQ,qBAAkB;AAC9E,SAASC,cAAc,EAAEC,WAAW,QAAQ,eAAY;AACxD,SAASC,e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,CAAES,GAAG,IACxC3F,QAAQ,CAACD,OAAO,CAAC0D,QAAQ,CAAC,EAAEkC,GAAG,CACjC,CAAC,EACD3B,KAAK,CAACC,IAAI,CAACrB,cAAc,CAACgD,MAAM,CAAC,CAAC,CAAC,CAACV,GAAG,CAAC,CAAC,GAAGW,KAAK,CAAC,KAAKA,KAAK,CAC9D,CAAC;gBAED,IAAIlF,aAAa,CAACmF,OAAO,IAAInC,UAAU,EAAE;kBACvChD,aAAa,CAAC,eAAe8C,QAAQ,EAAE,CAAC;kBACxC9C,aAAa,CAACgD,UAAU,EAAEkB,QAAQ,CAAC,CAAC,CAAC;gBACvC;cACF;cAEA,OAAOxB,aAAa,CAACI,QAAQ,EAAEC,gBAAgB,EAAEC,UAAU,CAAC;YAC9D;UACF,CAAC;QACH;QAEA,OAAOrC,kBAAkB,GACrBC,MAAM,CAACwE,GAAG,CAACzE,kBAAkB,CAACiB,UAAU,EAAEC,WAAW,CAAC,CAAC,GACvDjB,MAAM,CAACwE,GAAG,CAACxD,UAAU,CAAC;MAC5B;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This is a hack around Expo's handling of CSS files.
|
|
5
|
+
* When a component is inside a lazy() barrier, it is inside a different JS bundle.
|
|
6
|
+
* So when it updates, it only updates its local bundle, not the global one which contains the CSS files.
|
|
7
|
+
*
|
|
8
|
+
* To fix this, we force our code to always import the CSS files.
|
|
9
|
+
* Now the CSS files are in every bundle.
|
|
10
|
+
*
|
|
11
|
+
* We achieve this by collecting all CSS files and injecting them into a special file
|
|
12
|
+
* which is included inside react-native-css's runtime.
|
|
13
|
+
*
|
|
14
|
+
* This is why both of these function add imports for the CSS files.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export function getWebInjectionCode(filePaths) {
|
|
18
|
+
const importStatements = filePaths.map(filePath => `import "${filePath}";`).join("\n");
|
|
19
|
+
return Buffer.from(importStatements);
|
|
20
|
+
}
|
|
21
|
+
export function getNativeInjectionCode(cssFilePaths, values) {
|
|
22
|
+
const importStatements = cssFilePaths.map(filePath => `import "${filePath}";`).join("\n");
|
|
23
|
+
const importPath = `import { StyleCollection } from "./api";`;
|
|
24
|
+
const contents = values.map(value => `StyleCollection.inject(${JSON.stringify(value)});`).join("\n");
|
|
25
|
+
return Buffer.from(`${importStatements}\n${importPath}\n${contents};export {};`);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=injection-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getWebInjectionCode","filePaths","importStatements","map","filePath","join","Buffer","from","getNativeInjectionCode","cssFilePaths","values","importPath","contents","value","JSON","stringify"],"sourceRoot":"../../../src","sources":["metro/injection-code.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,mBAAmBA,CAACC,SAAmB,EAAE;EACvD,MAAMC,gBAAgB,GAAGD,SAAS,CAC/BE,GAAG,CAAEC,QAAQ,IAAK,WAAWA,QAAQ,IAAI,CAAC,CAC1CC,IAAI,CAAC,IAAI,CAAC;EAEb,OAAOC,MAAM,CAACC,IAAI,CAACL,gBAAgB,CAAC;AACtC;AAEA,OAAO,SAASM,sBAAsBA,CACpCC,YAAsB,EACtBC,MAAiB,EACjB;EACA,MAAMR,gBAAgB,GAAGO,YAAY,CAClCN,GAAG,CAAEC,QAAQ,IAAK,WAAWA,QAAQ,IAAI,CAAC,CAC1CC,IAAI,CAAC,IAAI,CAAC;EACb,MAAMM,UAAU,GAAG,0CAA0C;EAC7D,MAAMC,QAAQ,GAAGF,MAAM,CACpBP,GAAG,CAAEU,KAAK,IAAK,0BAA0BC,IAAI,CAACC,SAAS,CAACF,KAAK,CAAC,IAAI,CAAC,CACnER,IAAI,CAAC,IAAI,CAAC;EAEb,OAAOC,MAAM,CAACC,IAAI,CAChB,GAAGL,gBAAgB,KAAKS,UAAU,KAAKC,QAAQ,aACjD,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const worker =
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
5
|
+
require("@expo/metro-config/build/transform-worker/transform-worker.js");
|
|
6
|
+
export function transform(config, projectRoot, filePath, data, options) {
|
|
7
|
+
const isCss = options.type !== "asset" && /\.(s?css|sass)$/.test(filePath);
|
|
8
|
+
const skipCompile = options.customTransformOptions && "reactNativeCSSCompile" in options.customTransformOptions && options.customTransformOptions.reactNativeCSSCompile === false;
|
|
9
|
+
if (!isCss || skipCompile) {
|
|
10
|
+
return worker.transform(config, projectRoot, filePath, data, options);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// TODO - compile the CSS file inline
|
|
14
|
+
|
|
15
|
+
return worker.transform(config, projectRoot, filePath, data, options);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=metro-transformer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["worker","require","transform","config","projectRoot","filePath","data","options","isCss","type","test","skipCompile","customTransformOptions","reactNativeCSSCompile"],"sourceRoot":"../../../src","sources":["metro/metro-transformer.ts"],"mappings":";;AAMA,MAAMA,MAAM;AACV;AACAC,OAAO,CAAC,+DAA+D,CAA4C;AAErH,OAAO,SAASC,SAASA,CACvBC,MAA2B,EAC3BC,WAAmB,EACnBC,QAAgB,EAChBC,IAAY,EACZC,OAA2B,EACC;EAC5B,MAAMC,KAAK,GAAGD,OAAO,CAACE,IAAI,KAAK,OAAO,IAAI,iBAAiB,CAACC,IAAI,CAACL,QAAQ,CAAC;EAC1E,MAAMM,WAAW,GACfJ,OAAO,CAACK,sBAAsB,IAC9B,uBAAuB,IAAIL,OAAO,CAACK,sBAAsB,IACzDL,OAAO,CAACK,sBAAsB,CAACC,qBAAqB,KAAK,KAAK;EAEhE,IAAI,CAACL,KAAK,IAAIG,WAAW,EAAE;IACzB,OAAOX,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,CAAC;EACvE;;EAEA;;EAEA,OAAOP,MAAM,CAACE,SAAS,CAACC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,CAAC;AACvE","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// ISC License
|
|
5
|
+
|
|
6
|
+
// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
|
|
7
|
+
|
|
8
|
+
// Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
+
// purpose with or without fee is hereby granted, provided that the above
|
|
10
|
+
// copyright notice and this permission notice appear in all copies.
|
|
11
|
+
|
|
12
|
+
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
13
|
+
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
14
|
+
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
15
|
+
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
16
|
+
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
17
|
+
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
18
|
+
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
19
|
+
//
|
|
20
|
+
// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
env,
|
|
24
|
+
stdout
|
|
25
|
+
} = globalThis?.process ?? {};
|
|
26
|
+
const enabled = env && !env.NO_COLOR && (env.FORCE_COLOR || stdout?.isTTY && !env.CI && env.TERM !== "dumb");
|
|
27
|
+
const replaceClose = (str, close, replace, index) => {
|
|
28
|
+
const start = str.substring(0, index) + replace;
|
|
29
|
+
const end = str.substring(index + close.length);
|
|
30
|
+
const nextIndex = end.indexOf(close);
|
|
31
|
+
return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
|
|
32
|
+
};
|
|
33
|
+
const formatter = (open, close, replace = open) => {
|
|
34
|
+
if (!enabled) return String;
|
|
35
|
+
return input => {
|
|
36
|
+
const string = "" + input;
|
|
37
|
+
const index = string.indexOf(close, open.length);
|
|
38
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export const reset = enabled ? s => `\x1b[0m${s}\x1b[0m` : String;
|
|
42
|
+
export const bold = formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m");
|
|
43
|
+
export const dim = formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m");
|
|
44
|
+
export const italic = formatter("\x1b[3m", "\x1b[23m");
|
|
45
|
+
export const underline = formatter("\x1b[4m", "\x1b[24m");
|
|
46
|
+
export const inverse = formatter("\x1b[7m", "\x1b[27m");
|
|
47
|
+
export const hidden = formatter("\x1b[8m", "\x1b[28m");
|
|
48
|
+
export const strikethrough = formatter("\x1b[9m", "\x1b[29m");
|
|
49
|
+
export const black = formatter("\x1b[30m", "\x1b[39m");
|
|
50
|
+
export const red = formatter("\x1b[31m", "\x1b[39m");
|
|
51
|
+
export const green = formatter("\x1b[32m", "\x1b[39m");
|
|
52
|
+
export const yellow = formatter("\x1b[33m", "\x1b[39m");
|
|
53
|
+
export const blue = formatter("\x1b[34m", "\x1b[39m");
|
|
54
|
+
export const magenta = formatter("\x1b[35m", "\x1b[39m");
|
|
55
|
+
export const purple = formatter("\x1b[38;2;173;127;168m", "\x1b[39m");
|
|
56
|
+
export const cyan = formatter("\x1b[36m", "\x1b[39m");
|
|
57
|
+
export const white = formatter("\x1b[37m", "\x1b[39m");
|
|
58
|
+
export const gray = formatter("\x1b[90m", "\x1b[39m");
|
|
59
|
+
export const bgBlack = formatter("\x1b[40m", "\x1b[49m");
|
|
60
|
+
export const bgRed = formatter("\x1b[41m", "\x1b[49m");
|
|
61
|
+
export const bgGreen = formatter("\x1b[42m", "\x1b[49m");
|
|
62
|
+
export const bgYellow = formatter("\x1b[43m", "\x1b[49m");
|
|
63
|
+
export const bgBlue = formatter("\x1b[44m", "\x1b[49m");
|
|
64
|
+
export const bgMagenta = formatter("\x1b[45m", "\x1b[49m");
|
|
65
|
+
export const bgCyan = formatter("\x1b[46m", "\x1b[49m");
|
|
66
|
+
export const bgWhite = formatter("\x1b[47m", "\x1b[49m");
|
|
67
|
+
//# sourceMappingURL=picocolors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["env","stdout","globalThis","process","enabled","NO_COLOR","FORCE_COLOR","isTTY","CI","TERM","replaceClose","str","close","replace","index","start","substring","end","length","nextIndex","indexOf","formatter","open","String","input","string","reset","s","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","purple","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite"],"sourceRoot":"../../../src","sources":["metro/picocolors.ts"],"mappings":";;AAAA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;EAAEA,GAAG;EAAEC;AAAO,CAAC,GAAGC,UAAU,EAAEC,OAAO,IAAI,CAAC,CAAC;AAEjD,MAAMC,OAAO,GACXJ,GAAG,IACH,CAACA,GAAG,CAACK,QAAQ,KACZL,GAAG,CAACM,WAAW,IAAKL,MAAM,EAAEM,KAAK,IAAI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AU,CAAC;AACtD,OAAO,MAAM0B,OAAO,GAAG1B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;AACxD,OAAO,MAAM2B,QAAQ,GAAG3B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;AACzD,OAAO,MAAM4B,MAAM,GAAG5B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;AACvD,OAAO,MAAM6B,SAAS,GAAG7B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;AAC1D,OAAO,MAAM8B,MAAM,GAAG9B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;AACvD,OAAO,MAAM+B,OAAO,GAAG/B,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { basename, resolve, sep } from "node:path";
|
|
4
|
+
import { allowedModules } from "../babel/allowedModules.js";
|
|
5
|
+
const thisModuleDist = resolve(__dirname, "../../../dist");
|
|
6
|
+
const thisModuleSrc = resolve(__dirname, "../../../src");
|
|
7
|
+
function isFromThisModule(filename) {
|
|
8
|
+
return filename.startsWith(thisModuleDist) || filename.startsWith(thisModuleSrc);
|
|
9
|
+
}
|
|
10
|
+
export function nativeResolver(resolver, context, moduleName, platform) {
|
|
11
|
+
const resolution = resolver(context, moduleName, platform);
|
|
12
|
+
if (
|
|
13
|
+
// Don't include our internal files
|
|
14
|
+
isFromThisModule(context.originModulePath) ||
|
|
15
|
+
// Only operate on source files
|
|
16
|
+
resolution.type !== "sourceFile" ||
|
|
17
|
+
// Skip the React Native barrel file to prevent infinite recursion
|
|
18
|
+
context.originModulePath.endsWith("react-native/index.js") ||
|
|
19
|
+
// Skip anything that isn't importing a React Native component
|
|
20
|
+
!(moduleName.startsWith("react-native") || moduleName.startsWith("react-native/"))) {
|
|
21
|
+
return resolution;
|
|
22
|
+
}
|
|
23
|
+
if (moduleName === "react-native") {
|
|
24
|
+
return resolver(context, `react-native-css/components`, platform);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// We only care about `react-native/Library/Components/<module>.js` components
|
|
28
|
+
const segments = resolution.filePath.split(sep);
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
30
|
+
const module = basename(segments.at(-1)).split(".")[0];
|
|
31
|
+
if (!module || !allowedModules.has(module)) {
|
|
32
|
+
return resolution;
|
|
33
|
+
}
|
|
34
|
+
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
35
|
+
}
|
|
36
|
+
export function webResolver(resolver, context, moduleName, platform) {
|
|
37
|
+
const resolution = resolver(context, moduleName, platform);
|
|
38
|
+
if (
|
|
39
|
+
// Don't include our internal files
|
|
40
|
+
isFromThisModule(context.originModulePath) ||
|
|
41
|
+
// Only operate on source files
|
|
42
|
+
resolution.type !== "sourceFile" ||
|
|
43
|
+
// Skip anything that isn't importing from `react-native-web`
|
|
44
|
+
!resolution.filePath.includes(`${sep}react-native-web${sep}`)) {
|
|
45
|
+
return resolution;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// We only care about `react-native-web/<segment>/<segment>/<module>/index.js` components
|
|
49
|
+
const segments = resolution.filePath.split(sep);
|
|
50
|
+
const isIndex = segments.at(-1)?.startsWith("index.");
|
|
51
|
+
const module = segments.at(-2);
|
|
52
|
+
if (!isIndex || !module || !allowedModules.has(module)) {
|
|
53
|
+
return resolution;
|
|
54
|
+
}
|
|
55
|
+
return resolver(context, `react-native-css/components/${module}`, platform);
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["basename","resolve","sep","allowedModules","thisModuleDist","__dirname","thisModuleSrc","isFromThisModule","filename","startsWith","nativeResolver","resolver","context","moduleName","platform","resolution","originModulePath","type","endsWith","segments","filePath","split","module","at","has","webResolver","includes","isIndex"],"sourceRoot":"../../../src","sources":["metro/resolver.ts"],"mappings":";;AAAA,SAAS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AAM,CAAC,EAAE;IAC1C,OAAOP,UAAU;EACnB;EAEA,OAAOJ,QAAQ,CAACC,OAAO,EAAE,+BAA+BU,MAAM,EAAE,EAAER,QAAQ,CAAC;AAC7E;AAEA,OAAO,SAASW,WAAWA,CACzBd,QAAwB,EACxBC,OAAgC,EAChCC,UAAkB,EAClBC,QAAuB,EACX;EACZ,MAAMC,UAAU,GAAGJ,QAAQ,CAACC,OAAO,EAAEC,UAAU,EAAEC,QAAQ,CAAC;EAE1D;EACE;EACAP,gBAAgB,CAACK,OAAO,CAACI,gBAAgB,CAAC;EAC1C;EACAD,UAAU,CAACE,IAAI,KAAK,YAAY;EAChC;EACA,CAACF,UAAU,CAACK,QAAQ,CAACM,QAAQ,CAAC,GAAGxB,GAAG,mBAAmBA,GAAG,EAAE,CAAC,EAC7D;IACA,OAAOa,UAAU;EACnB;;EAEA;EACA,MAAMI,QAAQ,GAAGJ,UAAU,CAACK,QAAQ,CAACC,KAAK,CAACnB,GAAG,CAAC;EAC/C,MAAMyB,OAAO,GAAGR,QAAQ,CAACI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAEd,UAAU,CAAC,QAAQ,CAAC;EACrD,MAAMa,MAAM,GAAGH,QAAQ,CAACI,EAAE,CAAC,CAAC,CAAC,CAAC;EAE9B,IAAI,CAACI,OAAO,IAAI,CAACL,MAAM,IAAI,CAACnB,cAAc,CAACqB,GAAG,CAACF,MAAM,CAAC,EAAE;IACtD,OAAOP,UAAU;EACnB;EAEA,OAAOJ,QAAQ,CAACC,OAAO,EAAE,+BAA+BU,MAAM,EAAE,EAAER,QAAQ,CAAC;AAC7E","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Convert a data structure to JavaScript.
|
|
6
|
+
* The output should be similar to JSON, but without the extra characters.
|
|
7
|
+
* This is simply to reduce file size in production
|
|
8
|
+
*/
|
|
9
|
+
export function stringify(data) {
|
|
10
|
+
switch (typeof data) {
|
|
11
|
+
case "bigint":
|
|
12
|
+
case "symbol":
|
|
13
|
+
case "function":
|
|
14
|
+
throw new Error(`Cannot stringify ${typeof data}`);
|
|
15
|
+
case "string":
|
|
16
|
+
return `"${data}"`;
|
|
17
|
+
case "number":
|
|
18
|
+
// Reduce to 3 decimal places
|
|
19
|
+
return `${Math.round(data * 1000) / 1000}`;
|
|
20
|
+
case "boolean":
|
|
21
|
+
return `${data}`;
|
|
22
|
+
case "undefined":
|
|
23
|
+
// null is processed faster than undefined
|
|
24
|
+
// JSON.stringify also converts undefined to null
|
|
25
|
+
return "null";
|
|
26
|
+
case "object":
|
|
27
|
+
{
|
|
28
|
+
if (data === null) {
|
|
29
|
+
return "null";
|
|
30
|
+
} else if (Array.isArray(data)) {
|
|
31
|
+
return `[${data.map(value => {
|
|
32
|
+
// These values can be omitted to create a holey array
|
|
33
|
+
// This is slightly slower to parse at runtime, but keeps the
|
|
34
|
+
// file size smaller
|
|
35
|
+
return value === null || value === undefined ? "" : stringify(value);
|
|
36
|
+
}).join(",")}]`;
|
|
37
|
+
} else {
|
|
38
|
+
return `{${Object.entries(data).flatMap(([key, value]) => {
|
|
39
|
+
// If an object's property is undefined or null we can just skip it
|
|
40
|
+
if (value === null || value === undefined) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Make sure we quote strings that require quotes
|
|
45
|
+
if (key.match(/[^a-zA-Z]/)) {
|
|
46
|
+
key = `"${key}"`;
|
|
47
|
+
}
|
|
48
|
+
value = stringify(value);
|
|
49
|
+
return [`${key}:${value}`];
|
|
50
|
+
}).join(",")}}`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=stringify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stringify","data","Error","Math","round","Array","isArray","map","value","undefined","join","Object","entries","flat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,KAAK,GAAGR,SAAS,CAACQ,KAAK,CAAC;YAExB,OAAO,CAAC,GAAGM,GAAG,IAAIN,KAAK,EAAE,CAAC;UAC5B,CAAC,CAAC,CACDE,IAAI,CAAC,GAAG,CAAC,GAAG;QACjB;MACF;EACF;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
5
|
+
import { CommentArray, parse, stringify } from "comment-json";
|
|
6
|
+
import { bold, cyan } from "./picocolors.js";
|
|
7
|
+
export function setupTypeScript(envPath = "react-native-css-env.d.ts", name = "react-native-css") {
|
|
8
|
+
try {
|
|
9
|
+
const ts = require("typescript");
|
|
10
|
+
if (!ts) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const configFileName = ts.findConfigFile("./", ts.sys.fileExists, "tsconfig.json");
|
|
14
|
+
const userConfig = parse(readFileSync(configFileName, {
|
|
15
|
+
encoding: "utf-8"
|
|
16
|
+
}));
|
|
17
|
+
if (typeof userConfig !== "object" || !userConfig || Array.isArray(userConfig)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const output = [];
|
|
21
|
+
let updatedConfig = false;
|
|
22
|
+
if (!existsSync(envPath)) {
|
|
23
|
+
writeFileSync(envPath, `/// <reference types="react-native-css/types" />
|
|
24
|
+
|
|
25
|
+
// 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.`);
|
|
26
|
+
output.push(`Created ${cyan(envPath)}`);
|
|
27
|
+
}
|
|
28
|
+
userConfig.include ??= new CommentArray(envPath);
|
|
29
|
+
if (Array.isArray(userConfig.include) && !userConfig.include.includes(envPath)) {
|
|
30
|
+
userConfig.include.push(envPath);
|
|
31
|
+
updatedConfig = true;
|
|
32
|
+
output.push(`Updated ${configFileName} to include the ${cyan(envPath)} file`);
|
|
33
|
+
}
|
|
34
|
+
if (updatedConfig) {
|
|
35
|
+
writeFileSync(configFileName, stringify(userConfig, null, 2));
|
|
36
|
+
}
|
|
37
|
+
if (output.length) {
|
|
38
|
+
console.log(`${cyan(bold("NativeWind"))} made the following changes to your project to support TypeScript:\n - ${output.join("\n - ")}`);
|
|
39
|
+
}
|
|
40
|
+
} catch {}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=typescript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["existsSync","readFileSync","writeFileSync","CommentArray","parse","stringify","bold","cyan","setupTypeScript","envPath","name","ts","require","configFileName","findConfigFile","sys","fileExists","userConfig","encoding","Array","isArray","output","updatedConfig","push","include","includes","length","console","log","join"],"sourceRoot":"../../../src","sources":["metro/typescript.ts"],"mappings":";;AAAA;AACA,SAASA,UAAU,EAAEC,YAAY,EAAEC,aAAa,QAAQ,IAAI;AAE5D,SAASC,YAAY,EAAEC,KAAK,EAAEC,SAAS,QAAQ,cAAc;AAE7D,SAASC,IAAI,EAAEC,IAAI,QAAQ,iBAAc;AAEzC,OAAO,SAASC,eAAeA,CAC7BC,OAAO,GAAG,2BAA2B,EACrCC,IAAI,GAAG,kBAAkB,EACzB;EACA,IAAI;IACF,MAAMC,EAAE,GAAGC,OAAO,CAAC,YAAY,CAAC;IAChC,IAAI,CAACD,EAAE,EAAE;MACP;IACF;IAEA,MAAME,cAAc,GAAGF,EAAE,CAACG,cAAc,CACtC,IAAI,EACJH,EAAE,CAACI,GAAG,CAACC,UAAU,EACjB,eACF,CAAC;IAED,MAAMC,UAAU,GAAGb,KAAK,CACtBH,YAAY,CAACY,cAAc,EAAE;MAC3BK,QAAQ,EAAE;IACZ,CAAC,CACH,CAAC;IAED,IACE,OAAOD,UAAU,KAAK,QAAQ,IAC9B,CAACA,UAAU,IACXE,KAAK,CAACC,OAAO,CAACH,UAAU,CAAC,EACzB;MACA;IACF;IAEA,MAAMI,MAAgB,GAAG,EAAE;IAC3B,IAAIC,aAAa,GAAG,KAAK;IAEzB,IAAI,CAACtB,UAAU,CAACS,OAAO,CAAC,EAAE;MACxBP,aAAa,CACXO,OAAO,EACP;AACR;AACA,4GAA4GC,IAAI,2EAC1G,CAAC;MACDW,MAAM,CAACE,IAAI,CAAC,WAAWhB,IAAI,CAACE,OAAO,CAAC,EAAE,CAAC;IACzC;IAEAQ,UAAU,CAACO,OAAO,KAAK,IAAIrB,YAAY,CAACM,OAAO,CAAC;IAChD,IACEU,KAAK,CAACC,OAAO,CAACH,UAAU,CAACO,OAAO,CAAC,IACjC,CAACP,UAAU,CAACO,OAAO,CAACC,QAAQ,CAAChB,OAAO,CAAC,EACrC;MACAQ,UAAU,CAACO,OAAO,CAACD,IAAI,CAACd,OAAO,CAAC;MAChCa,aAAa,GAAG,IAAI;MACpBD,MAAM,CAACE,IAAI,CACT,WAAWV,cAAc,mBAAmBN,IAAI,CAACE,OAAO,CAAC,OAC3D,CAAC;IACH;IAEA,IAAIa,aAAa,EAAE;MACjBpB,aAAa,CAACW,cAAc,EAAER,SAAS,CAACY,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/D;IAEA,IAAII,MAAM,CAACK,MAAM,EAAE;MACjBC,OAAO,CAACC,GAAG,CACT,GAAGrB,IAAI,CAACD,IAAI,CAAC,YAAY,CAAC,CAAC,2EAA2Ee,MAAM,CAACQ,IAAI,CAAC,QAAQ,CAAC,EAC7H,CAAC;IACH;EACF,CAAC,CAAC,MAAM,CAAC;AACX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
throw new Error(`react-native-css has encountered a setup error.
|
|
4
|
+
|
|
5
|
+
┌─────-─┐
|
|
6
|
+
| Metro |
|
|
7
|
+
└─────-─┘
|
|
8
|
+
|
|
9
|
+
Either your metro.config.js is missing the 'withReactNativeCSS' wrapper OR
|
|
10
|
+
the resolver.resolveRequest function of your config is being overridden, and not calling the parent resolver.
|
|
11
|
+
|
|
12
|
+
When using 3rd party libraries, please use withReactNativeCSS as the innermost function when composing Metro configs.
|
|
13
|
+
|
|
14
|
+
\`\`\`ts
|
|
15
|
+
const config = getDefaultConfig(__dirname);
|
|
16
|
+
module.exports = with3rdPartyPlugin(
|
|
17
|
+
withReactNativeCSS(config)
|
|
18
|
+
)
|
|
19
|
+
\`\`\`
|
|
20
|
+
|
|
21
|
+
┌─────------─┐
|
|
22
|
+
| NativeWind |
|
|
23
|
+
└─────------─┘
|
|
24
|
+
|
|
25
|
+
If you are using NativeWind with the 'withNativeWind' function, follow the Metro instructions above, but use 'withNativeWind' instead of 'withReactNativeCSS'.
|
|
26
|
+
|
|
27
|
+
┌─────----------─┐
|
|
28
|
+
| Other bundlers |
|
|
29
|
+
└─────----------─┘
|
|
30
|
+
|
|
31
|
+
If you are using another bundler (Vite, Webpack, etc), or non-Metro framework (Next.js, Remix, etc), please ensure you have included 'react-native-css/babel' as a babel preset.
|
|
32
|
+
`);
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=poison.pill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Error"],"sourceRoot":"../../src","sources":["poison.pill.ts"],"mappings":";;AAAA,MAAM,IAAIA,KAAK,CAAC;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AAEF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["runtime/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,cAAc,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { useContext, useState } from "react";
|
|
5
|
+
import { Appearance } from "react-native";
|
|
6
|
+
import { mappingToConfig, useNativeCss } from "./react/useNativeCss.js";
|
|
7
|
+
import { usePassthrough } from "./react/usePassthrough.js";
|
|
8
|
+
import { colorScheme as colorSchemeObs, VAR_SYMBOL, VariableContext } from "./reactivity.js";
|
|
9
|
+
import { resolveValue } from "./styles/resolve.js";
|
|
10
|
+
export { StyleCollection } from "./injection.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Generates a new Higher-Order component the wraps the base component and applies the styles.
|
|
14
|
+
* This is added to the `interopComponents` map so that it can be used in the `wrapJSX` function
|
|
15
|
+
* @param baseComponent
|
|
16
|
+
* @param mapping
|
|
17
|
+
*/
|
|
18
|
+
export const styled = (baseComponent, mapping, options) => {
|
|
19
|
+
let component;
|
|
20
|
+
// const type = getComponentType(baseComponent);
|
|
21
|
+
|
|
22
|
+
const configs = mappingToConfig(mapping);
|
|
23
|
+
if (options?.passThrough) {
|
|
24
|
+
component = props => {
|
|
25
|
+
return usePassthrough(baseComponent, props, configs);
|
|
26
|
+
};
|
|
27
|
+
} else {
|
|
28
|
+
component = props => {
|
|
29
|
+
return useNativeCss(baseComponent, props, configs);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const name = baseComponent.displayName ?? baseComponent.name ?? "unknown";
|
|
33
|
+
component.displayName = `CssInterop.${name}`;
|
|
34
|
+
return component;
|
|
35
|
+
};
|
|
36
|
+
export const colorScheme = {
|
|
37
|
+
get() {
|
|
38
|
+
return colorSchemeObs.get() ?? Appearance.getColorScheme() ?? "light";
|
|
39
|
+
},
|
|
40
|
+
set(value) {
|
|
41
|
+
return colorSchemeObs.set(value);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
export const useUnstableNativeVariable = useNativeVariable;
|
|
45
|
+
export const useCssElement = (component, incomingProps, mapping) => {
|
|
46
|
+
const [config] = useState(() => mappingToConfig(mapping));
|
|
47
|
+
return useNativeCss(component, incomingProps, config);
|
|
48
|
+
};
|
|
49
|
+
export function useNativeVariable(name) {
|
|
50
|
+
if (name.startsWith("--")) {
|
|
51
|
+
name = name.slice(2);
|
|
52
|
+
}
|
|
53
|
+
const inheritedVariables = useContext(VariableContext);
|
|
54
|
+
const [effect, setState] = useState(() => {
|
|
55
|
+
const effect = {
|
|
56
|
+
observers: new Set(),
|
|
57
|
+
run: () => setState(state => ({
|
|
58
|
+
...state
|
|
59
|
+
}))
|
|
60
|
+
};
|
|
61
|
+
const get = observable => observable.get(effect);
|
|
62
|
+
return {
|
|
63
|
+
...effect,
|
|
64
|
+
get
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
return resolveValue([{}, "var", [name]], effect.get, {
|
|
68
|
+
inheritedVariables
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
export function vars(variables) {
|
|
72
|
+
variables[VAR_SYMBOL] = "inline";
|
|
73
|
+
return variables;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useContext","useState","Appearance","mappingToConfig","useNativeCss","usePassthrough","colorScheme","colorSchemeObs","VAR_SYMBOL","VariableContext","resolveValue","StyleCollection","styled","baseComponent","mapping","options","component","configs","passThrough","props","name","displayName","get","getColorScheme","set","value","useUnstableNativeVariable","useNativeVariable","useCssElement","incomingProps","config","startsWith","slice","inheritedVariables","effect","setState","observers","Set","run","state","observable","vars","variables"],"sourceRoot":"../../../../src","sources":["runtime/native/api.ts"],"mappings":";;AAAA;AACA,SAASA,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AAC5C,SAASC,UAAU,QAAQ,cAAc;AAUzC,SAASC,eAAe,EAAEC,YAAY,QAAQ,yBAAsB;AACpE,SAASC,cAAc,QAAQ,2BAAwB;AACvD,SACEC,WAAW,IAAIC,cAAc,EAC7BC,UAAU,EACVC,eAAe,QAGV,iBAAc;AACrB,SAASC,YAAY,QAAQ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