react-native-css 2.1.1 → 3.0.0-nightly.4723140
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 +10 -86
- package/dist/commonjs/babel/helpers.js +129 -0
- package/dist/commonjs/babel/helpers.js.map +1 -0
- package/dist/commonjs/babel/import-plugin.js +97 -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/compiler/add.js +175 -0
- package/dist/commonjs/compiler/add.js.map +1 -0
- package/dist/commonjs/compiler/compiler.js +466 -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 +1843 -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/keyframes.js +69 -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 +330 -0
- package/dist/commonjs/compiler/selectors.js.map +1 -0
- package/dist/commonjs/components/ActivityIndicator.js +20 -0
- package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
- package/dist/commonjs/components/SafeAreaProvider/index.js +41 -0
- package/dist/commonjs/components/SafeAreaProvider/index.js.map +1 -0
- package/dist/commonjs/components/SafeAreaProvider/index.web.js +13 -0
- package/dist/commonjs/components/SafeAreaProvider/index.web.js.map +1 -0
- package/dist/commonjs/components/Text.js +15 -0
- package/dist/commonjs/components/Text.js.map +1 -0
- package/dist/commonjs/components/TextInput.js +20 -0
- package/dist/commonjs/components/TextInput.js.map +1 -0
- package/dist/commonjs/components/View.js +15 -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 +17 -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 +106 -0
- package/dist/commonjs/metro/index.js.map +1 -0
- package/dist/commonjs/metro/injection-code.js +12 -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/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/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 +27 -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 +91 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/commonjs/runtime/native/index.js +18 -0
- package/dist/commonjs/runtime/native/index.js.map +1 -0
- package/dist/commonjs/runtime/native/injection.js +80 -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 +257 -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 +193 -0
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/animation.js +90 -0
- package/dist/commonjs/runtime/native/styles/animation.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calc.js +113 -0
- package/dist/commonjs/runtime/native/styles/calc.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/constants.js +8 -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/index.js +223 -0
- package/dist/commonjs/runtime/native/styles/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +96 -0
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthand.js +62 -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 +17 -0
- package/dist/commonjs/runtime/native/styles/transform.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/units.js +46 -0
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/variables.js +57 -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 +71 -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 +14 -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 +17 -0
- package/dist/commonjs/runtime/web/index.js.map +1 -0
- package/dist/module/babel/helpers.js +120 -0
- package/dist/module/babel/helpers.js.map +1 -0
- package/dist/module/babel/import-plugin.js +93 -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/compiler/add.js +168 -0
- package/dist/module/compiler/add.js.map +1 -0
- package/dist/module/compiler/compiler.js +461 -0
- package/dist/module/compiler/compiler.js.map +1 -0
- package/dist/module/compiler/compiler.types.js +72 -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 +1834 -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/keyframes.js +63 -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 +325 -0
- package/dist/module/compiler/selectors.js.map +1 -0
- package/dist/module/components/ActivityIndicator.js +16 -0
- package/dist/module/components/ActivityIndicator.js.map +1 -0
- package/dist/module/components/SafeAreaProvider/index.js +36 -0
- package/dist/module/components/SafeAreaProvider/index.js.map +1 -0
- package/dist/module/components/SafeAreaProvider/index.web.js +4 -0
- package/dist/module/components/SafeAreaProvider/index.web.js.map +1 -0
- package/dist/module/components/Text.js +11 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/TextInput.js +16 -0
- package/dist/module/components/TextInput.js.map +1 -0
- package/dist/module/components/View.js +11 -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 +4 -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 +28 -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 +100 -0
- package/dist/module/metro/index.js.map +1 -0
- package/dist/module/metro/injection-code.js +8 -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/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/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 +23 -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 +86 -0
- package/dist/module/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/module/runtime/native/index.js +6 -0
- package/dist/module/runtime/native/index.js.map +1 -0
- package/dist/module/runtime/native/injection.js +75 -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 +251 -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 +181 -0
- package/dist/module/runtime/native/reactivity.js.map +1 -0
- package/dist/module/runtime/native/styles/animation.js +85 -0
- package/dist/module/runtime/native/styles/animation.js.map +1 -0
- package/dist/module/runtime/native/styles/calc.js +108 -0
- package/dist/module/runtime/native/styles/calc.js.map +1 -0
- package/dist/module/runtime/native/styles/constants.js +4 -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/index.js +218 -0
- package/dist/module/runtime/native/styles/index.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +92 -0
- package/dist/module/runtime/native/styles/resolve.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthand.js +57 -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 +12 -0
- package/dist/module/runtime/native/styles/transform.js.map +1 -0
- package/dist/module/runtime/native/styles/units.js +37 -0
- package/dist/module/runtime/native/styles/units.js.map +1 -0
- package/dist/module/runtime/native/styles/variables.js +53 -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 +64 -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 +10 -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 +4 -0
- package/dist/module/runtime/web/index.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/helpers.d.ts +18 -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/compiler/add.d.ts +10 -0
- package/dist/typescript/commonjs/src/compiler/add.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 +279 -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 +28 -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/keyframes.d.ts +6 -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 +18 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +3 -0
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.web.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/SafeAreaProvider/index.web.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/TextInput.d.ts +13 -0
- package/dist/typescript/commonjs/src/components/TextInput.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 +2 -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 +10 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts +2 -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/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/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 +6 -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 +8 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.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/constants.d.ts +2 -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/index.d.ts +20 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +14 -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 +12 -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 +62 -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 +4 -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 +3 -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 +3 -0
- package/dist/typescript/commonjs/src/runtime/web/index.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/helpers.d.ts +18 -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/compiler/add.d.ts +10 -0
- package/dist/typescript/module/src/compiler/add.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 +279 -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 +28 -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/keyframes.d.ts +6 -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 +18 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts +3 -0
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/module/src/components/SafeAreaProvider/index.d.ts +4 -0
- package/dist/typescript/module/src/components/SafeAreaProvider/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/SafeAreaProvider/index.web.d.ts +2 -0
- package/dist/typescript/module/src/components/SafeAreaProvider/index.web.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/TextInput.d.ts +13 -0
- package/dist/typescript/module/src/components/TextInput.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 +2 -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 +10 -0
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts +2 -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/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/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 +6 -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 +8 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.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/constants.d.ts +2 -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/index.d.ts +20 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +14 -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 +12 -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 +62 -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 +4 -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 +3 -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 +3 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts.map +1 -0
- package/package.json +191 -45
- package/src/babel/helpers.ts +182 -0
- package/src/babel/import-plugin.ts +183 -0
- package/src/babel/index.ts +9 -0
- package/src/compiler/add.ts +257 -0
- package/src/compiler/compiler.ts +627 -0
- package/src/compiler/compiler.types.ts +372 -0
- package/src/compiler/container-query.ts +97 -0
- package/src/compiler/declarations.ts +3146 -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/keyframes.ts +100 -0
- package/src/compiler/media-query.ts +250 -0
- package/src/compiler/selectors.ts +473 -0
- package/src/components/ActivityIndicator.tsx +19 -0
- package/src/components/SafeAreaProvider/index.tsx +50 -0
- package/src/components/SafeAreaProvider/index.web.tsx +1 -0
- package/src/components/Text.tsx +15 -0
- package/src/components/TextInput.tsx +20 -0
- package/src/components/View.tsx +15 -0
- package/src/components/index.tsx +4 -0
- package/src/doctor/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/jest/expect.d.ts +1 -0
- package/src/jest/index.ts +40 -0
- package/src/jest/setup.ts +1 -0
- package/src/jest/setupAfterEnv.ts +13 -0
- package/src/metro/index.ts +137 -0
- package/src/metro/injection-code.ts +8 -0
- package/src/metro/metro-transformer.ts +31 -0
- package/src/metro/picocolors.ts +77 -0
- package/src/metro/stringify.ts +59 -0
- package/src/metro/typescript.ts +73 -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 +37 -0
- package/src/runtime/native/conditions/index.ts +106 -0
- package/src/runtime/native/conditions/media-query.ts +92 -0
- package/src/runtime/native/index.ts +5 -0
- package/src/runtime/native/injection.ts +101 -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 +333 -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 +266 -0
- package/src/runtime/native/styles/animation.ts +142 -0
- package/src/runtime/native/styles/calc.ts +120 -0
- package/src/runtime/native/styles/constants.ts +1 -0
- package/src/runtime/native/styles/defaults.ts +78 -0
- package/src/runtime/native/styles/index.ts +333 -0
- package/src/runtime/native/styles/resolve.ts +131 -0
- package/src/runtime/native/styles/shorthand.ts +101 -0
- package/src/runtime/native/styles/text-shadow.ts +17 -0
- package/src/runtime/native/styles/transform.ts +15 -0
- package/src/runtime/native/styles/units.ts +48 -0
- package/src/runtime/native/styles/variables.ts +72 -0
- package/src/runtime/runtime.native.ts +1 -0
- package/src/runtime/runtime.ts +1 -0
- package/src/runtime/runtime.types.ts +155 -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 +82 -0
- package/src/runtime/utils/specificity.ts +44 -0
- package/src/runtime/utils/style-value.ts +12 -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 +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,461 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { debug } from "debug";
|
|
5
|
+
import { transform as lightningcss } from "lightningcss";
|
|
6
|
+
import { Specificity } from "../runtime/utils/specificity.js";
|
|
7
|
+
import { buildAddFn } from "./add.js";
|
|
8
|
+
import { parseContainerCondition } from "./container-query.js";
|
|
9
|
+
import { parseDeclaration } from "./declarations.js";
|
|
10
|
+
import { extractKeyFrames } from "./keyframes.js";
|
|
11
|
+
import { parseMediaQuery } from "./media-query.js";
|
|
12
|
+
import { getSelectors, toRNProperty } from "./selectors.js";
|
|
13
|
+
/**
|
|
14
|
+
* Converts a CSS file to a collection of style declarations that can be used with the StyleSheet API
|
|
15
|
+
*
|
|
16
|
+
* @param code - The CSS file contents
|
|
17
|
+
* @param options - Compiler options
|
|
18
|
+
* @returns A `ReactNativeCssStyleSheet` that can be passed to `StyleSheet.register` or used with a custom runtime
|
|
19
|
+
*/
|
|
20
|
+
export function compile(code, {
|
|
21
|
+
logger = debug("react-native-css"),
|
|
22
|
+
...options
|
|
23
|
+
} = {}) {
|
|
24
|
+
const features = Object.assign({}, options.features);
|
|
25
|
+
logger(`Features ${JSON.stringify(features)}`);
|
|
26
|
+
|
|
27
|
+
// These will by mutated by `extractRule`
|
|
28
|
+
const collection = {
|
|
29
|
+
darkMode: "dark",
|
|
30
|
+
rules: new Map(),
|
|
31
|
+
keyframes: new Map(),
|
|
32
|
+
rootVariables: {},
|
|
33
|
+
universalVariables: {},
|
|
34
|
+
appearanceOrder: 1,
|
|
35
|
+
...options,
|
|
36
|
+
features,
|
|
37
|
+
varUsageCount: new Map()
|
|
38
|
+
};
|
|
39
|
+
logger(`Start lightningcss`);
|
|
40
|
+
const onVarUsage = token => {
|
|
41
|
+
if (token.type === "function") {
|
|
42
|
+
token.value.arguments.forEach(token => onVarUsage(token));
|
|
43
|
+
} else if (token.type === "var") {
|
|
44
|
+
const variable = token.value;
|
|
45
|
+
const varName = variable.name.ident;
|
|
46
|
+
collection.varUsageCount.set(varName, (collection.varUsageCount.get(varName) || 0) + 1);
|
|
47
|
+
if (variable.fallback) {
|
|
48
|
+
const fallbackValues = variable.fallback;
|
|
49
|
+
fallbackValues.forEach(varObj => onVarUsage(varObj));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Use the lightningcss library to traverse the CSS AST and extract style declarations and animations
|
|
55
|
+
lightningcss({
|
|
56
|
+
filename: "style.css",
|
|
57
|
+
// This is ignored, but required
|
|
58
|
+
code: typeof code === "string" ? new TextEncoder().encode(code) : code,
|
|
59
|
+
visitor: {
|
|
60
|
+
Declaration(decl) {
|
|
61
|
+
// Track variable usage, we remove any unused variables
|
|
62
|
+
if (decl.property !== "unparsed" && decl.property !== "custom") return;
|
|
63
|
+
decl.value.value.forEach(varObj => onVarUsage(varObj));
|
|
64
|
+
return decl;
|
|
65
|
+
},
|
|
66
|
+
StyleSheetExit(sheet) {
|
|
67
|
+
logger(`Found ${sheet.rules.length} rules to process`);
|
|
68
|
+
for (const rule of sheet.rules) {
|
|
69
|
+
// Extract the style declarations and animations from the current rule
|
|
70
|
+
extractRule(rule, collection);
|
|
71
|
+
// We have processed this rule, so now delete it from the AST
|
|
72
|
+
}
|
|
73
|
+
logger(`Exiting lightningcss`);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
customAtRules: {
|
|
77
|
+
"react-native": {
|
|
78
|
+
prelude: "<custom-ident>+",
|
|
79
|
+
body: "declaration-list"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
logger(`Found ${collection.rules.size} valid rules`);
|
|
84
|
+
const ruleSets = new Map();
|
|
85
|
+
for (const [name, styles] of collection.rules) {
|
|
86
|
+
if (styles.length === 0) continue;
|
|
87
|
+
const normal = [];
|
|
88
|
+
const important = [];
|
|
89
|
+
for (const style of styles) {
|
|
90
|
+
if (style.s[Specificity.Important]) {
|
|
91
|
+
important.push(style);
|
|
92
|
+
} else {
|
|
93
|
+
normal.push(style);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
ruleSets.set(name, [...normal, ...important]);
|
|
97
|
+
}
|
|
98
|
+
const stylesheetOptions = {};
|
|
99
|
+
if (ruleSets.size) {
|
|
100
|
+
stylesheetOptions.s = Array.from(ruleSets);
|
|
101
|
+
}
|
|
102
|
+
if (collection.keyframes.size) {
|
|
103
|
+
stylesheetOptions.k = Array.from(collection.keyframes);
|
|
104
|
+
}
|
|
105
|
+
if (Object.keys(collection.rootVariables).length) {
|
|
106
|
+
stylesheetOptions.vr = Object.entries(collection.rootVariables);
|
|
107
|
+
}
|
|
108
|
+
if (Object.keys(collection.universalVariables).length) {
|
|
109
|
+
stylesheetOptions.vu = Object.entries(collection.universalVariables);
|
|
110
|
+
}
|
|
111
|
+
return stylesheetOptions;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Extracts style declarations and animations from a given CSS rule, based on its type.
|
|
115
|
+
*
|
|
116
|
+
* @param {Rule} rule - The CSS rule to extract style declarations and animations from.
|
|
117
|
+
* @param {CompilerCollection} collection - Options for the extraction process, including maps for storing extracted data.
|
|
118
|
+
* @param {CssToReactNativeRuntimeOptions} parseOptions - Options for parsing the CSS code, such as grouping related rules together.
|
|
119
|
+
*/
|
|
120
|
+
function extractRule(rule, collection, partialStyle = {}) {
|
|
121
|
+
// Check the rule's type to determine which extraction function to call
|
|
122
|
+
switch (rule.type) {
|
|
123
|
+
case "keyframes":
|
|
124
|
+
{
|
|
125
|
+
// If the rule is a keyframe animation, extract it with the `extractKeyFrames` function
|
|
126
|
+
extractKeyFrames(rule.value, collection);
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
case "container":
|
|
130
|
+
{
|
|
131
|
+
// If the rule is a container, extract it with the `extractedContainer` function
|
|
132
|
+
extractedContainer(rule.value, collection);
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
case "media":
|
|
136
|
+
{
|
|
137
|
+
// If the rule is a media query, extract it with the `extractMedia` function
|
|
138
|
+
extractMedia(rule.value, collection);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
case "style":
|
|
142
|
+
{
|
|
143
|
+
// If the rule is a style declaration, extract it with the `getExtractedStyle` function and store it in the `declarations` map
|
|
144
|
+
if (rule.value.declarations) {
|
|
145
|
+
for (const style of getExtractedStyles(rule.value.declarations, collection, parseReactNativeStyleAtRule(rule.value.rules))) {
|
|
146
|
+
setStyleForSelectorList({
|
|
147
|
+
...partialStyle,
|
|
148
|
+
...style
|
|
149
|
+
}, rule.value.selectors, collection);
|
|
150
|
+
}
|
|
151
|
+
collection.appearanceOrder++;
|
|
152
|
+
}
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
case "custom":
|
|
156
|
+
{
|
|
157
|
+
if (isReactNativeAtRule(rule)) {
|
|
158
|
+
extractReactNativeOptions(rule, collection);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function isReactNativeAtRule(rule) {
|
|
164
|
+
return rule.type === "custom" && rule.value?.name === "react-native";
|
|
165
|
+
}
|
|
166
|
+
function extractReactNativeOptions(rule, collection) {
|
|
167
|
+
const {
|
|
168
|
+
declarations
|
|
169
|
+
} = rule.value.body.value;
|
|
170
|
+
if (!declarations) return;
|
|
171
|
+
for (const declaration of declarations) {
|
|
172
|
+
if (declaration.property !== "custom") continue;
|
|
173
|
+
switch (declaration.value.name) {
|
|
174
|
+
case "preserve-variables":
|
|
175
|
+
{
|
|
176
|
+
declaration.value.value.forEach(token => {
|
|
177
|
+
if (token.type !== "dashed-ident") {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
collection.varUsageCount.set(token.value, 1);
|
|
181
|
+
});
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
default:
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @rn-move is a custom at-rule that allows you to move a style property to a different prop/location
|
|
192
|
+
* Its a placeholder concept until we improve the LightningCSS parsing
|
|
193
|
+
*/
|
|
194
|
+
function parseReactNativeStyleAtRule(rules) {
|
|
195
|
+
const mapping = {};
|
|
196
|
+
if (!rules) return mapping;
|
|
197
|
+
for (const rule of rules) {
|
|
198
|
+
if (!isReactNativeAtRule(rule)) continue;
|
|
199
|
+
if (!rule.value.prelude) continue;
|
|
200
|
+
if (rule.value.prelude.value.components[0]?.value !== "rename") {
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
const {
|
|
204
|
+
declarations
|
|
205
|
+
} = rule.value.body.value;
|
|
206
|
+
if (!declarations) continue;
|
|
207
|
+
for (const declaration of declarations) {
|
|
208
|
+
if (declaration.property !== "custom") continue;
|
|
209
|
+
let values = [];
|
|
210
|
+
for (const [index, value] of declaration.value.value.entries()) {
|
|
211
|
+
if (value.type !== "token") {
|
|
212
|
+
values = [];
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
const token = value.value;
|
|
216
|
+
if (token.type === "delim") {
|
|
217
|
+
// Ignore the dot
|
|
218
|
+
if (token.value === ".") {
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
if (token.value === "^" && index === 0) {
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Any other delim is invalid
|
|
226
|
+
values = [];
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
if (token.type !== "ident") {
|
|
230
|
+
// Only ident is allowed
|
|
231
|
+
values = [];
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
if (index === 0) {
|
|
235
|
+
values.push("style");
|
|
236
|
+
}
|
|
237
|
+
values.push(toRNProperty(token.value));
|
|
238
|
+
}
|
|
239
|
+
if (values.length > 0) {
|
|
240
|
+
mapping[toRNProperty(declaration.value.name)] = values;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return mapping;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* This function takes in a MediaRule object, an CompilerCollection object and a CssToReactNativeRuntimeOptions object,
|
|
249
|
+
* and returns an array of MediaQuery objects representing styles extracted from screen media queries.
|
|
250
|
+
*
|
|
251
|
+
* @param mediaRule - The MediaRule object containing the media query and its rules.
|
|
252
|
+
* @param collection - The CompilerCollection object to use when extracting styles.
|
|
253
|
+
* @param parseOptions - The CssToReactNativeRuntimeOptions object to use when parsing styles.
|
|
254
|
+
*
|
|
255
|
+
* @returns undefined if no screen media queries are found in the mediaRule, else it returns the extracted styles.
|
|
256
|
+
*/
|
|
257
|
+
function extractMedia(mediaRule, collection) {
|
|
258
|
+
// Initialize an empty array to store screen media queries
|
|
259
|
+
const media = [];
|
|
260
|
+
|
|
261
|
+
// Iterate over all media queries in the mediaRule
|
|
262
|
+
for (const mediaQuery of mediaRule.query.mediaQueries) {
|
|
263
|
+
if (
|
|
264
|
+
// If this is only a media query
|
|
265
|
+
mediaQuery.mediaType === "print" && mediaQuery.qualifier !== "not" ||
|
|
266
|
+
// If this is a @media not print {}
|
|
267
|
+
// We can only do this if there are no conditions, as @media not print and (min-width: 100px) could be valid
|
|
268
|
+
mediaQuery.mediaType !== "print" && mediaQuery.qualifier === "not" && mediaQuery.condition === null) {
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
media.push(mediaQuery);
|
|
272
|
+
}
|
|
273
|
+
if (media.length === 0) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
const options = {
|
|
277
|
+
add: () => {},
|
|
278
|
+
addWarning: () => {}
|
|
279
|
+
};
|
|
280
|
+
const m = media.map(m => parseMediaQuery(m, options)).filter(m => m !== undefined);
|
|
281
|
+
|
|
282
|
+
// Iterate over all rules in the mediaRule and extract their styles using the updated CompilerCollection
|
|
283
|
+
for (const rule of mediaRule.rules) {
|
|
284
|
+
extractRule(rule, collection, {
|
|
285
|
+
m
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @param containerRule - The ContainerRule object containing the container query and its rules.
|
|
292
|
+
* @param collection - The CompilerCollection object to use when extracting styles.
|
|
293
|
+
* @param parseOptions - The CssToReactNativeRuntimeOptions object to use when parsing styles.
|
|
294
|
+
*/
|
|
295
|
+
function extractedContainer(containerRule, collection) {
|
|
296
|
+
const options = {
|
|
297
|
+
add: () => {},
|
|
298
|
+
addWarning: () => {}
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
// Iterate over all rules inside the containerRule and extract their styles using the updated CompilerCollection
|
|
302
|
+
for (const rule of containerRule.rules) {
|
|
303
|
+
const query = {
|
|
304
|
+
m: parseContainerCondition(containerRule.condition, options)
|
|
305
|
+
};
|
|
306
|
+
if (containerRule.name) {
|
|
307
|
+
query.n = containerRule.name;
|
|
308
|
+
}
|
|
309
|
+
extractRule(rule, collection, {
|
|
310
|
+
cq: [query]
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* @param style - The ExtractedStyle object to use when setting styles.
|
|
317
|
+
* @param selectorList - The SelectorList object containing the selectors to use when setting styles.
|
|
318
|
+
* @param declarations - The declarations object to use when adding declarations.
|
|
319
|
+
*/
|
|
320
|
+
function setStyleForSelectorList(extractedStyle, selectorList, collection) {
|
|
321
|
+
const {
|
|
322
|
+
rules: declarations
|
|
323
|
+
} = collection;
|
|
324
|
+
const selectors = getSelectors(extractedStyle, selectorList, collection);
|
|
325
|
+
if (!(extractedStyle.d || extractedStyle.v)) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
for (const selector of selectors) {
|
|
329
|
+
const style = {
|
|
330
|
+
...extractedStyle
|
|
331
|
+
};
|
|
332
|
+
if (selector.type === "rootVariables" ||
|
|
333
|
+
// :root
|
|
334
|
+
selector.type === "universalVariables" // *
|
|
335
|
+
) {
|
|
336
|
+
const fontSizeValue = style.d?.reverse().find(value => {
|
|
337
|
+
return typeof value === "object" && "fontSize" in value;
|
|
338
|
+
})?.[0];
|
|
339
|
+
if (typeof collection.inlineRem !== "number" && fontSizeValue && typeof fontSizeValue === "object" && "fontSize" in fontSizeValue && typeof fontSizeValue["fontSize"] === "number") {
|
|
340
|
+
collection.rem = fontSizeValue["fontSize"];
|
|
341
|
+
if (collection.inlineRem === undefined) {
|
|
342
|
+
collection.inlineRem = collection.rem;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (!style.v) {
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
const {
|
|
349
|
+
type,
|
|
350
|
+
subtype
|
|
351
|
+
} = selector;
|
|
352
|
+
collection[type] ??= {};
|
|
353
|
+
for (const [name, value] of style.v) {
|
|
354
|
+
collection[type] ??= {};
|
|
355
|
+
collection[type][name] ??= [undefined];
|
|
356
|
+
if (subtype === "light") {
|
|
357
|
+
collection[type][name][0] = value;
|
|
358
|
+
} else {
|
|
359
|
+
collection[type][name][1] = value;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
continue;
|
|
363
|
+
} else if (selector.type === "className") {
|
|
364
|
+
const specificity = [];
|
|
365
|
+
if (selector.classNames.length === 0) {
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
368
|
+
for (let index = 0; index < 5; index++) {
|
|
369
|
+
const value = (extractedStyle.s[index] ?? 0) + (selector.specificity[index] ?? 0);
|
|
370
|
+
if (value) {
|
|
371
|
+
specificity[index] = value;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
const primarySelector = selector.classNames.pop();
|
|
375
|
+
for (const [group, conditions] of selector.classNames) {
|
|
376
|
+
// Add the conditions to the declarations object
|
|
377
|
+
addDeclaration(declarations, group, {
|
|
378
|
+
s: specificity,
|
|
379
|
+
c: [`g:${group}`]
|
|
380
|
+
});
|
|
381
|
+
primarySelector[1] ??= {};
|
|
382
|
+
primarySelector[1].cq ??= [];
|
|
383
|
+
const containerQuery = {
|
|
384
|
+
n: `g:${group}`
|
|
385
|
+
};
|
|
386
|
+
if (conditions) {
|
|
387
|
+
if (conditions.m?.length) {
|
|
388
|
+
containerQuery.m = conditions.m[0];
|
|
389
|
+
}
|
|
390
|
+
if (conditions.aq) {
|
|
391
|
+
containerQuery.a = conditions.aq;
|
|
392
|
+
}
|
|
393
|
+
if (conditions.p) {
|
|
394
|
+
containerQuery.p = conditions.p;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
primarySelector[1].cq.push(containerQuery);
|
|
398
|
+
}
|
|
399
|
+
const rule = {
|
|
400
|
+
...style,
|
|
401
|
+
s: specificity
|
|
402
|
+
};
|
|
403
|
+
const conditions = primarySelector[1];
|
|
404
|
+
if (conditions) {
|
|
405
|
+
if (conditions.cq) {
|
|
406
|
+
rule.cq ??= [];
|
|
407
|
+
rule.cq.push(...conditions.cq);
|
|
408
|
+
}
|
|
409
|
+
if (conditions.m) {
|
|
410
|
+
rule.m = conditions.m;
|
|
411
|
+
}
|
|
412
|
+
if (conditions.p) {
|
|
413
|
+
rule.p = Object.assign({}, rule.p, conditions.p);
|
|
414
|
+
}
|
|
415
|
+
if (conditions.aq) {
|
|
416
|
+
rule.aq ??= [];
|
|
417
|
+
rule.aq.push(...conditions.aq);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
addDeclaration(declarations, primarySelector[0], rule);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
function addDeclaration(declarations, className, style) {
|
|
425
|
+
const existing = declarations.get(className);
|
|
426
|
+
if (existing) {
|
|
427
|
+
existing.push(style);
|
|
428
|
+
} else {
|
|
429
|
+
declarations.set(className, [style]);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
function getExtractedStyles(declarationBlock, collection, mapping = {}) {
|
|
433
|
+
const extractedStyles = [];
|
|
434
|
+
const specificity = [];
|
|
435
|
+
specificity[Specificity.Order] = collection.appearanceOrder;
|
|
436
|
+
if (declarationBlock.declarations && declarationBlock.declarations.length) {
|
|
437
|
+
extractedStyles.push(declarationsToStyle(declarationBlock.declarations, collection, specificity, mapping));
|
|
438
|
+
}
|
|
439
|
+
if (declarationBlock.importantDeclarations && declarationBlock.importantDeclarations.length) {
|
|
440
|
+
specificity[Specificity.Important] = 1;
|
|
441
|
+
extractedStyles.push(declarationsToStyle(declarationBlock.importantDeclarations, collection, specificity, mapping));
|
|
442
|
+
}
|
|
443
|
+
return extractedStyles;
|
|
444
|
+
}
|
|
445
|
+
function declarationsToStyle(declarations, collection, specificity, mapping) {
|
|
446
|
+
const extractedStyle = {
|
|
447
|
+
s: [...specificity]
|
|
448
|
+
};
|
|
449
|
+
const parseDeclarationOptions = {
|
|
450
|
+
...collection
|
|
451
|
+
};
|
|
452
|
+
const addWarning = () => {
|
|
453
|
+
// TODO
|
|
454
|
+
};
|
|
455
|
+
const addFn = buildAddFn(extractedStyle, collection, mapping);
|
|
456
|
+
for (const declaration of declarations) {
|
|
457
|
+
parseDeclaration(declaration, parseDeclarationOptions, addFn, addWarning);
|
|
458
|
+
}
|
|
459
|
+
return extractedStyle;
|
|
460
|
+
}
|
|
461
|
+
//# sourceMappingURL=compiler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["debug","transform","lightningcss","Specificity","buildAddFn","parseContainerCondition","parseDeclaration","extractKeyFrames","parseMediaQuery","getSelectors","toRNProperty","compile","code","logger","options","features","Object","assign","JSON","stringify","collection","darkMode","rules","Map","keyframes","rootVariables","universalVariables","appearanceOrder","varUsageCount","onVarUsage","token","type","value","arguments","forEach","variable","varName","name","ident","set","get","fallback","fallbackValues","varObj","filename","TextEncoder","encode","visitor","Declaration","decl","property","StyleSheetExit","sheet","length","rule","extractRule","customAtRules","prelude","body","size","ruleSets","styles","normal","important","style","s","Important","push","stylesheetOptions","Array","from","k","keys","vr","entries","vu","partialStyle","extractedContainer","extractMedia","declarations","getExtractedStyles","parseReactNativeStyleAtRule","setStyleForSelectorList","selectors","isReactNativeAtRule","extractReactNativeOptions","declaration","mapping","components","values","index","mediaRule","media","mediaQuery","query","mediaQueries","mediaType","qualifier","condition","add","addWarning","m","map","filter","undefined","containerRule","n","cq","extractedStyle","selectorList","d","v","selector","fontSizeValue","reverse","find","inlineRem","rem","subtype","specificity","classNames","primarySelector","pop","group","conditions","addDeclaration","c","containerQuery","aq","a","p","className","existing","declarationBlock","extractedStyles","Order","declarationsToStyle","importantDeclarations","parseDeclarationOptions","addFn"],"sourceRoot":"../../../src","sources":["compiler/compiler.ts"],"mappings":";;AAAA;AACA,SAASA,KAAK,QAAQ,OAAO;AAC7B,SACEC,SAAS,IAAIC,YAAY,QAUpB,cAAc;AAErB,SAASC,WAAW,QAAQ,iCAA8B;AAC1D,SAASC,UAAU,QAAQ,UAAO;AAalC,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SACEC,gBAAgB,QAI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F,CACF,CAAC;EACH;EAEA,IACE8C,gBAAgB,CAACI,qBAAqB,IACtCJ,gBAAgB,CAACI,qBAAqB,CAACpF,MAAM,EAC7C;IACAkE,WAAW,CAACpH,WAAW,CAAC+D,SAAS,CAAC,GAAG,CAAC;IACtCoE,eAAe,CAACnE,IAAI,CAClBqE,mBAAmB,CACjBH,gBAAgB,CAACI,qBAAqB,EACtCrH,UAAU,EACVmG,WAAW,EACXhC,OACF,CACF,CAAC;EACH;EAEA,OAAO+C,eAAe;AACxB;AAEA,SAASE,mBAAmBA,CAC1BzD,YAA2B,EAC3B3D,UAA8B,EAC9BmG,WAA6B,EAC7BhC,OAAyB,EACd;EACX,MAAMqB,cAAyB,GAAG;IAChC3C,CAAC,EAAE,CAAC,GAAGsD,WAAW;EACpB,CAAC;EAED,MAAMmB,uBAAgD,GAAG;IACvD,GAAGtH;EACL,CAAC;EAED,MAAMgF,UAAwB,GAAGA,CAAA,KAAM;IACrC;EAAA,CACD;EAED,MAAMuC,KAAK,GAAGvI,UAAU,CAACwG,cAAc,EAAExF,UAAU,EAAEmE,OAAO,CAAC;EAE7D,KAAK,MAAMD,WAAW,IAAIP,YAAY,EAAE;IACtCzE,gBAAgB,CAACgF,WAAW,EAAEoD,uBAAuB,EAAEC,KAAK,EAAEvC,UAAU,CAAC;EAC3E;EAEA,OAAOQ,cAAc;AACvB","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import { VAR_SYMBOL } from "../runtime/native/reactivity.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A `react-native-css` StyleSheet
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/******************************** Styles ********************************/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The JS representation of a style object
|
|
15
|
+
*
|
|
16
|
+
* This CSS rule is a single StyleRuleSet, made up of multiple StyleRules
|
|
17
|
+
*
|
|
18
|
+
* ```css
|
|
19
|
+
* .my-class {
|
|
20
|
+
* color: red;
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
* Properties are split into normal and important properties, and then split
|
|
24
|
+
* into different StyleRules depending on their specificity, conditions, etc
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/****************************** Variables *******************************/
|
|
28
|
+
|
|
29
|
+
/****************************** Animations V1 ******************************/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* An animation with a fallback style value
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A CSS Animation rule
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/****************************** Animations V2 ******************************/
|
|
40
|
+
|
|
41
|
+
/****************************** Transitions *****************************/
|
|
42
|
+
|
|
43
|
+
/****************************** Conditions ******************************/
|
|
44
|
+
|
|
45
|
+
// Data-Attribute
|
|
46
|
+
|
|
47
|
+
// Case sensitivity
|
|
48
|
+
|
|
49
|
+
/****************************** Containers *****************************/
|
|
50
|
+
|
|
51
|
+
/****************************** Specificity *****************************/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* https://drafts.csswg.org/selectors/#specificity-rules
|
|
55
|
+
*
|
|
56
|
+
* This array is sorted by most common values when parsing a StyleSheet
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/****************************** Compiler ********************************/
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
//# sourceMappingURL=compiler.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["VAR_SYMBOL"],"sourceRoot":"../../../src","sources":["compiler/compiler.types.ts"],"mappings":";;AAAA;;AAQA,SAASA,UAAU,QAAQ,iCAA8B;;AAazD;AACA;AACA;;AAkBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2EA;;AAaA;;AAEA;AACA;AACA;;AAKA;AACA;AACA;;AA0FA;;AAKA;;AAqBA;;AAwCS;;AAMkE;;AAI3E;;AAUA;;AAEA;AACA;AACA;AACA;AACA;;AAIA;;AAKA;;AAEA;;AAGA;AACA;AACA;;AAKA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import { parseMediaFeatureOperator, parseMediaFeatureValue } from "./media-query.js";
|
|
6
|
+
export function parseContainerCondition(condition, options) {
|
|
7
|
+
let containerQuery = parseContainerQueryCondition(condition, options);
|
|
8
|
+
|
|
9
|
+
// If any of these are undefined, the media query is invalid
|
|
10
|
+
if (!containerQuery || containerQuery.some(v => v === undefined)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return containerQuery;
|
|
14
|
+
}
|
|
15
|
+
function parseContainerQueryCondition(condition, options) {
|
|
16
|
+
switch (condition.type) {
|
|
17
|
+
case "feature":
|
|
18
|
+
return parseFeature(condition.value, options);
|
|
19
|
+
case "not":
|
|
20
|
+
const query = parseContainerCondition(condition.value, options);
|
|
21
|
+
return query ? ["!", query] : undefined;
|
|
22
|
+
case "operation":
|
|
23
|
+
const conditions = condition.conditions.map(c => parseContainerQueryCondition(c, options)).filter(v => !!v);
|
|
24
|
+
if (conditions.length === 0) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
switch (condition.operator) {
|
|
28
|
+
case "and":
|
|
29
|
+
return ["&", conditions];
|
|
30
|
+
case "or":
|
|
31
|
+
return ["|", conditions];
|
|
32
|
+
default:
|
|
33
|
+
condition.operator;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
case "style":
|
|
37
|
+
// We don't support these yet
|
|
38
|
+
return;
|
|
39
|
+
default:
|
|
40
|
+
condition;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function parseFeature(feature, options) {
|
|
45
|
+
switch (feature.type) {
|
|
46
|
+
case "boolean":
|
|
47
|
+
return ["!!", feature.name];
|
|
48
|
+
case "plain":
|
|
49
|
+
return ["=", feature.name, parseMediaFeatureValue(feature.value, options)];
|
|
50
|
+
case "range":
|
|
51
|
+
return [parseMediaFeatureOperator(feature.operator), feature.name, parseMediaFeatureValue(feature.value, options)];
|
|
52
|
+
case "interval":
|
|
53
|
+
return ["[]", feature.name, parseMediaFeatureValue(feature.start, options), parseMediaFeatureOperator(feature.startOperator), parseMediaFeatureValue(feature.end, options), parseMediaFeatureOperator(feature.endOperator)];
|
|
54
|
+
default:
|
|
55
|
+
feature;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=container-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["parseMediaFeatureOperator","parseMediaFeatureValue","parseContainerCondition","condition","options","containerQuery","parseContainerQueryCondition","some","v","undefined","type","parseFeature","value","query","conditions","map","c","filter","length","operator","feature","name","start","startOperator","end","endOperator"],"sourceRoot":"../../../src","sources":["compiler/container-query.ts"],"mappings":";;AAAA;;AAQA,SACEA,yBAAyB,EACzBC,sBAAsB,QACjB,kBAAe;AAEtB,OAAO,SAASC,uBAAuBA,CACrCC,SAAgC,EAChCC,OAAsB,EACtB;EACA,IAAIC,cAAc,GAAGC,4BAA4B,CAACH,SAAS,EAAEC,OAAO,CAAC;;EAErE;EACA,IAAI,CAACC,cAAc,IAAIA,cAAc,CAACE,IAAI,CAAEC,CAAC,IAAKA,CAAC,KAAKC,SAAS,CAAC,EAAE;IAClE;EACF;EAEA,OAAOJ,cAAc;AACvB;AAEA,SAASC,4BAA4BA,CACnCH,SAAgC,EAChCC,OAAsB,EACM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