react-native-css 2.1.2 → 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 -47
- 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 -17
- package/.editorconfig +0 -17
- package/.eslintignore +0 -3
- package/.eslintrc +0 -39
- package/.npmignore +0 -7
- package/build/index.js +0 -299
- package/build/utils.js +0 -61
- package/circle.yml +0 -31
- package/jsconfig.json +0 -9
- package/login.sh +0 -11
- package/src/index.js +0 -184
- package/src/utils.js +0 -32
- package/test/rnc.test.js +0 -258
- package/yarn.lock +0 -3333
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.compile = compile;
|
|
7
|
+
var _debug = require("debug");
|
|
8
|
+
var _lightningcss = require("lightningcss");
|
|
9
|
+
var _specificity = require("../runtime/utils/specificity.js");
|
|
10
|
+
var _add = require("./add.js");
|
|
11
|
+
var _containerQuery = require("./container-query.js");
|
|
12
|
+
var _declarations = require("./declarations.js");
|
|
13
|
+
var _keyframes = require("./keyframes.js");
|
|
14
|
+
var _mediaQuery = require("./media-query.js");
|
|
15
|
+
var _selectors = require("./selectors.js");
|
|
16
|
+
/* eslint-disable */
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Converts a CSS file to a collection of style declarations that can be used with the StyleSheet API
|
|
20
|
+
*
|
|
21
|
+
* @param code - The CSS file contents
|
|
22
|
+
* @param options - Compiler options
|
|
23
|
+
* @returns A `ReactNativeCssStyleSheet` that can be passed to `StyleSheet.register` or used with a custom runtime
|
|
24
|
+
*/
|
|
25
|
+
function compile(code, {
|
|
26
|
+
logger = (0, _debug.debug)("react-native-css"),
|
|
27
|
+
...options
|
|
28
|
+
} = {}) {
|
|
29
|
+
const features = Object.assign({}, options.features);
|
|
30
|
+
logger(`Features ${JSON.stringify(features)}`);
|
|
31
|
+
|
|
32
|
+
// These will by mutated by `extractRule`
|
|
33
|
+
const collection = {
|
|
34
|
+
darkMode: "dark",
|
|
35
|
+
rules: new Map(),
|
|
36
|
+
keyframes: new Map(),
|
|
37
|
+
rootVariables: {},
|
|
38
|
+
universalVariables: {},
|
|
39
|
+
appearanceOrder: 1,
|
|
40
|
+
...options,
|
|
41
|
+
features,
|
|
42
|
+
varUsageCount: new Map()
|
|
43
|
+
};
|
|
44
|
+
logger(`Start lightningcss`);
|
|
45
|
+
const onVarUsage = token => {
|
|
46
|
+
if (token.type === "function") {
|
|
47
|
+
token.value.arguments.forEach(token => onVarUsage(token));
|
|
48
|
+
} else if (token.type === "var") {
|
|
49
|
+
const variable = token.value;
|
|
50
|
+
const varName = variable.name.ident;
|
|
51
|
+
collection.varUsageCount.set(varName, (collection.varUsageCount.get(varName) || 0) + 1);
|
|
52
|
+
if (variable.fallback) {
|
|
53
|
+
const fallbackValues = variable.fallback;
|
|
54
|
+
fallbackValues.forEach(varObj => onVarUsage(varObj));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// Use the lightningcss library to traverse the CSS AST and extract style declarations and animations
|
|
60
|
+
(0, _lightningcss.transform)({
|
|
61
|
+
filename: "style.css",
|
|
62
|
+
// This is ignored, but required
|
|
63
|
+
code: typeof code === "string" ? new TextEncoder().encode(code) : code,
|
|
64
|
+
visitor: {
|
|
65
|
+
Declaration(decl) {
|
|
66
|
+
// Track variable usage, we remove any unused variables
|
|
67
|
+
if (decl.property !== "unparsed" && decl.property !== "custom") return;
|
|
68
|
+
decl.value.value.forEach(varObj => onVarUsage(varObj));
|
|
69
|
+
return decl;
|
|
70
|
+
},
|
|
71
|
+
StyleSheetExit(sheet) {
|
|
72
|
+
logger(`Found ${sheet.rules.length} rules to process`);
|
|
73
|
+
for (const rule of sheet.rules) {
|
|
74
|
+
// Extract the style declarations and animations from the current rule
|
|
75
|
+
extractRule(rule, collection);
|
|
76
|
+
// We have processed this rule, so now delete it from the AST
|
|
77
|
+
}
|
|
78
|
+
logger(`Exiting lightningcss`);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
customAtRules: {
|
|
82
|
+
"react-native": {
|
|
83
|
+
prelude: "<custom-ident>+",
|
|
84
|
+
body: "declaration-list"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
logger(`Found ${collection.rules.size} valid rules`);
|
|
89
|
+
const ruleSets = new Map();
|
|
90
|
+
for (const [name, styles] of collection.rules) {
|
|
91
|
+
if (styles.length === 0) continue;
|
|
92
|
+
const normal = [];
|
|
93
|
+
const important = [];
|
|
94
|
+
for (const style of styles) {
|
|
95
|
+
if (style.s[_specificity.Specificity.Important]) {
|
|
96
|
+
important.push(style);
|
|
97
|
+
} else {
|
|
98
|
+
normal.push(style);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
ruleSets.set(name, [...normal, ...important]);
|
|
102
|
+
}
|
|
103
|
+
const stylesheetOptions = {};
|
|
104
|
+
if (ruleSets.size) {
|
|
105
|
+
stylesheetOptions.s = Array.from(ruleSets);
|
|
106
|
+
}
|
|
107
|
+
if (collection.keyframes.size) {
|
|
108
|
+
stylesheetOptions.k = Array.from(collection.keyframes);
|
|
109
|
+
}
|
|
110
|
+
if (Object.keys(collection.rootVariables).length) {
|
|
111
|
+
stylesheetOptions.vr = Object.entries(collection.rootVariables);
|
|
112
|
+
}
|
|
113
|
+
if (Object.keys(collection.universalVariables).length) {
|
|
114
|
+
stylesheetOptions.vu = Object.entries(collection.universalVariables);
|
|
115
|
+
}
|
|
116
|
+
return stylesheetOptions;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Extracts style declarations and animations from a given CSS rule, based on its type.
|
|
120
|
+
*
|
|
121
|
+
* @param {Rule} rule - The CSS rule to extract style declarations and animations from.
|
|
122
|
+
* @param {CompilerCollection} collection - Options for the extraction process, including maps for storing extracted data.
|
|
123
|
+
* @param {CssToReactNativeRuntimeOptions} parseOptions - Options for parsing the CSS code, such as grouping related rules together.
|
|
124
|
+
*/
|
|
125
|
+
function extractRule(rule, collection, partialStyle = {}) {
|
|
126
|
+
// Check the rule's type to determine which extraction function to call
|
|
127
|
+
switch (rule.type) {
|
|
128
|
+
case "keyframes":
|
|
129
|
+
{
|
|
130
|
+
// If the rule is a keyframe animation, extract it with the `extractKeyFrames` function
|
|
131
|
+
(0, _keyframes.extractKeyFrames)(rule.value, collection);
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
case "container":
|
|
135
|
+
{
|
|
136
|
+
// If the rule is a container, extract it with the `extractedContainer` function
|
|
137
|
+
extractedContainer(rule.value, collection);
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
case "media":
|
|
141
|
+
{
|
|
142
|
+
// If the rule is a media query, extract it with the `extractMedia` function
|
|
143
|
+
extractMedia(rule.value, collection);
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
case "style":
|
|
147
|
+
{
|
|
148
|
+
// If the rule is a style declaration, extract it with the `getExtractedStyle` function and store it in the `declarations` map
|
|
149
|
+
if (rule.value.declarations) {
|
|
150
|
+
for (const style of getExtractedStyles(rule.value.declarations, collection, parseReactNativeStyleAtRule(rule.value.rules))) {
|
|
151
|
+
setStyleForSelectorList({
|
|
152
|
+
...partialStyle,
|
|
153
|
+
...style
|
|
154
|
+
}, rule.value.selectors, collection);
|
|
155
|
+
}
|
|
156
|
+
collection.appearanceOrder++;
|
|
157
|
+
}
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
case "custom":
|
|
161
|
+
{
|
|
162
|
+
if (isReactNativeAtRule(rule)) {
|
|
163
|
+
extractReactNativeOptions(rule, collection);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function isReactNativeAtRule(rule) {
|
|
169
|
+
return rule.type === "custom" && rule.value?.name === "react-native";
|
|
170
|
+
}
|
|
171
|
+
function extractReactNativeOptions(rule, collection) {
|
|
172
|
+
const {
|
|
173
|
+
declarations
|
|
174
|
+
} = rule.value.body.value;
|
|
175
|
+
if (!declarations) return;
|
|
176
|
+
for (const declaration of declarations) {
|
|
177
|
+
if (declaration.property !== "custom") continue;
|
|
178
|
+
switch (declaration.value.name) {
|
|
179
|
+
case "preserve-variables":
|
|
180
|
+
{
|
|
181
|
+
declaration.value.value.forEach(token => {
|
|
182
|
+
if (token.type !== "dashed-ident") {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
collection.varUsageCount.set(token.value, 1);
|
|
186
|
+
});
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
default:
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @rn-move is a custom at-rule that allows you to move a style property to a different prop/location
|
|
197
|
+
* Its a placeholder concept until we improve the LightningCSS parsing
|
|
198
|
+
*/
|
|
199
|
+
function parseReactNativeStyleAtRule(rules) {
|
|
200
|
+
const mapping = {};
|
|
201
|
+
if (!rules) return mapping;
|
|
202
|
+
for (const rule of rules) {
|
|
203
|
+
if (!isReactNativeAtRule(rule)) continue;
|
|
204
|
+
if (!rule.value.prelude) continue;
|
|
205
|
+
if (rule.value.prelude.value.components[0]?.value !== "rename") {
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
const {
|
|
209
|
+
declarations
|
|
210
|
+
} = rule.value.body.value;
|
|
211
|
+
if (!declarations) continue;
|
|
212
|
+
for (const declaration of declarations) {
|
|
213
|
+
if (declaration.property !== "custom") continue;
|
|
214
|
+
let values = [];
|
|
215
|
+
for (const [index, value] of declaration.value.value.entries()) {
|
|
216
|
+
if (value.type !== "token") {
|
|
217
|
+
values = [];
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
const token = value.value;
|
|
221
|
+
if (token.type === "delim") {
|
|
222
|
+
// Ignore the dot
|
|
223
|
+
if (token.value === ".") {
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
if (token.value === "^" && index === 0) {
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Any other delim is invalid
|
|
231
|
+
values = [];
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
if (token.type !== "ident") {
|
|
235
|
+
// Only ident is allowed
|
|
236
|
+
values = [];
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
if (index === 0) {
|
|
240
|
+
values.push("style");
|
|
241
|
+
}
|
|
242
|
+
values.push((0, _selectors.toRNProperty)(token.value));
|
|
243
|
+
}
|
|
244
|
+
if (values.length > 0) {
|
|
245
|
+
mapping[(0, _selectors.toRNProperty)(declaration.value.name)] = values;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return mapping;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* This function takes in a MediaRule object, an CompilerCollection object and a CssToReactNativeRuntimeOptions object,
|
|
254
|
+
* and returns an array of MediaQuery objects representing styles extracted from screen media queries.
|
|
255
|
+
*
|
|
256
|
+
* @param mediaRule - The MediaRule object containing the media query and its rules.
|
|
257
|
+
* @param collection - The CompilerCollection object to use when extracting styles.
|
|
258
|
+
* @param parseOptions - The CssToReactNativeRuntimeOptions object to use when parsing styles.
|
|
259
|
+
*
|
|
260
|
+
* @returns undefined if no screen media queries are found in the mediaRule, else it returns the extracted styles.
|
|
261
|
+
*/
|
|
262
|
+
function extractMedia(mediaRule, collection) {
|
|
263
|
+
// Initialize an empty array to store screen media queries
|
|
264
|
+
const media = [];
|
|
265
|
+
|
|
266
|
+
// Iterate over all media queries in the mediaRule
|
|
267
|
+
for (const mediaQuery of mediaRule.query.mediaQueries) {
|
|
268
|
+
if (
|
|
269
|
+
// If this is only a media query
|
|
270
|
+
mediaQuery.mediaType === "print" && mediaQuery.qualifier !== "not" ||
|
|
271
|
+
// If this is a @media not print {}
|
|
272
|
+
// We can only do this if there are no conditions, as @media not print and (min-width: 100px) could be valid
|
|
273
|
+
mediaQuery.mediaType !== "print" && mediaQuery.qualifier === "not" && mediaQuery.condition === null) {
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
media.push(mediaQuery);
|
|
277
|
+
}
|
|
278
|
+
if (media.length === 0) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const options = {
|
|
282
|
+
add: () => {},
|
|
283
|
+
addWarning: () => {}
|
|
284
|
+
};
|
|
285
|
+
const m = media.map(m => (0, _mediaQuery.parseMediaQuery)(m, options)).filter(m => m !== undefined);
|
|
286
|
+
|
|
287
|
+
// Iterate over all rules in the mediaRule and extract their styles using the updated CompilerCollection
|
|
288
|
+
for (const rule of mediaRule.rules) {
|
|
289
|
+
extractRule(rule, collection, {
|
|
290
|
+
m
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* @param containerRule - The ContainerRule object containing the container query and its rules.
|
|
297
|
+
* @param collection - The CompilerCollection object to use when extracting styles.
|
|
298
|
+
* @param parseOptions - The CssToReactNativeRuntimeOptions object to use when parsing styles.
|
|
299
|
+
*/
|
|
300
|
+
function extractedContainer(containerRule, collection) {
|
|
301
|
+
const options = {
|
|
302
|
+
add: () => {},
|
|
303
|
+
addWarning: () => {}
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// Iterate over all rules inside the containerRule and extract their styles using the updated CompilerCollection
|
|
307
|
+
for (const rule of containerRule.rules) {
|
|
308
|
+
const query = {
|
|
309
|
+
m: (0, _containerQuery.parseContainerCondition)(containerRule.condition, options)
|
|
310
|
+
};
|
|
311
|
+
if (containerRule.name) {
|
|
312
|
+
query.n = containerRule.name;
|
|
313
|
+
}
|
|
314
|
+
extractRule(rule, collection, {
|
|
315
|
+
cq: [query]
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @param style - The ExtractedStyle object to use when setting styles.
|
|
322
|
+
* @param selectorList - The SelectorList object containing the selectors to use when setting styles.
|
|
323
|
+
* @param declarations - The declarations object to use when adding declarations.
|
|
324
|
+
*/
|
|
325
|
+
function setStyleForSelectorList(extractedStyle, selectorList, collection) {
|
|
326
|
+
const {
|
|
327
|
+
rules: declarations
|
|
328
|
+
} = collection;
|
|
329
|
+
const selectors = (0, _selectors.getSelectors)(extractedStyle, selectorList, collection);
|
|
330
|
+
if (!(extractedStyle.d || extractedStyle.v)) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
for (const selector of selectors) {
|
|
334
|
+
const style = {
|
|
335
|
+
...extractedStyle
|
|
336
|
+
};
|
|
337
|
+
if (selector.type === "rootVariables" ||
|
|
338
|
+
// :root
|
|
339
|
+
selector.type === "universalVariables" // *
|
|
340
|
+
) {
|
|
341
|
+
const fontSizeValue = style.d?.reverse().find(value => {
|
|
342
|
+
return typeof value === "object" && "fontSize" in value;
|
|
343
|
+
})?.[0];
|
|
344
|
+
if (typeof collection.inlineRem !== "number" && fontSizeValue && typeof fontSizeValue === "object" && "fontSize" in fontSizeValue && typeof fontSizeValue["fontSize"] === "number") {
|
|
345
|
+
collection.rem = fontSizeValue["fontSize"];
|
|
346
|
+
if (collection.inlineRem === undefined) {
|
|
347
|
+
collection.inlineRem = collection.rem;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
if (!style.v) {
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
const {
|
|
354
|
+
type,
|
|
355
|
+
subtype
|
|
356
|
+
} = selector;
|
|
357
|
+
collection[type] ??= {};
|
|
358
|
+
for (const [name, value] of style.v) {
|
|
359
|
+
collection[type] ??= {};
|
|
360
|
+
collection[type][name] ??= [undefined];
|
|
361
|
+
if (subtype === "light") {
|
|
362
|
+
collection[type][name][0] = value;
|
|
363
|
+
} else {
|
|
364
|
+
collection[type][name][1] = value;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
continue;
|
|
368
|
+
} else if (selector.type === "className") {
|
|
369
|
+
const specificity = [];
|
|
370
|
+
if (selector.classNames.length === 0) {
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
for (let index = 0; index < 5; index++) {
|
|
374
|
+
const value = (extractedStyle.s[index] ?? 0) + (selector.specificity[index] ?? 0);
|
|
375
|
+
if (value) {
|
|
376
|
+
specificity[index] = value;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
const primarySelector = selector.classNames.pop();
|
|
380
|
+
for (const [group, conditions] of selector.classNames) {
|
|
381
|
+
// Add the conditions to the declarations object
|
|
382
|
+
addDeclaration(declarations, group, {
|
|
383
|
+
s: specificity,
|
|
384
|
+
c: [`g:${group}`]
|
|
385
|
+
});
|
|
386
|
+
primarySelector[1] ??= {};
|
|
387
|
+
primarySelector[1].cq ??= [];
|
|
388
|
+
const containerQuery = {
|
|
389
|
+
n: `g:${group}`
|
|
390
|
+
};
|
|
391
|
+
if (conditions) {
|
|
392
|
+
if (conditions.m?.length) {
|
|
393
|
+
containerQuery.m = conditions.m[0];
|
|
394
|
+
}
|
|
395
|
+
if (conditions.aq) {
|
|
396
|
+
containerQuery.a = conditions.aq;
|
|
397
|
+
}
|
|
398
|
+
if (conditions.p) {
|
|
399
|
+
containerQuery.p = conditions.p;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
primarySelector[1].cq.push(containerQuery);
|
|
403
|
+
}
|
|
404
|
+
const rule = {
|
|
405
|
+
...style,
|
|
406
|
+
s: specificity
|
|
407
|
+
};
|
|
408
|
+
const conditions = primarySelector[1];
|
|
409
|
+
if (conditions) {
|
|
410
|
+
if (conditions.cq) {
|
|
411
|
+
rule.cq ??= [];
|
|
412
|
+
rule.cq.push(...conditions.cq);
|
|
413
|
+
}
|
|
414
|
+
if (conditions.m) {
|
|
415
|
+
rule.m = conditions.m;
|
|
416
|
+
}
|
|
417
|
+
if (conditions.p) {
|
|
418
|
+
rule.p = Object.assign({}, rule.p, conditions.p);
|
|
419
|
+
}
|
|
420
|
+
if (conditions.aq) {
|
|
421
|
+
rule.aq ??= [];
|
|
422
|
+
rule.aq.push(...conditions.aq);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
addDeclaration(declarations, primarySelector[0], rule);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function addDeclaration(declarations, className, style) {
|
|
430
|
+
const existing = declarations.get(className);
|
|
431
|
+
if (existing) {
|
|
432
|
+
existing.push(style);
|
|
433
|
+
} else {
|
|
434
|
+
declarations.set(className, [style]);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
function getExtractedStyles(declarationBlock, collection, mapping = {}) {
|
|
438
|
+
const extractedStyles = [];
|
|
439
|
+
const specificity = [];
|
|
440
|
+
specificity[_specificity.Specificity.Order] = collection.appearanceOrder;
|
|
441
|
+
if (declarationBlock.declarations && declarationBlock.declarations.length) {
|
|
442
|
+
extractedStyles.push(declarationsToStyle(declarationBlock.declarations, collection, specificity, mapping));
|
|
443
|
+
}
|
|
444
|
+
if (declarationBlock.importantDeclarations && declarationBlock.importantDeclarations.length) {
|
|
445
|
+
specificity[_specificity.Specificity.Important] = 1;
|
|
446
|
+
extractedStyles.push(declarationsToStyle(declarationBlock.importantDeclarations, collection, specificity, mapping));
|
|
447
|
+
}
|
|
448
|
+
return extractedStyles;
|
|
449
|
+
}
|
|
450
|
+
function declarationsToStyle(declarations, collection, specificity, mapping) {
|
|
451
|
+
const extractedStyle = {
|
|
452
|
+
s: [...specificity]
|
|
453
|
+
};
|
|
454
|
+
const parseDeclarationOptions = {
|
|
455
|
+
...collection
|
|
456
|
+
};
|
|
457
|
+
const addWarning = () => {
|
|
458
|
+
// TODO
|
|
459
|
+
};
|
|
460
|
+
const addFn = (0, _add.buildAddFn)(extractedStyle, collection, mapping);
|
|
461
|
+
for (const declaration of declarations) {
|
|
462
|
+
(0, _declarations.parseDeclaration)(declaration, parseDeclarationOptions, addFn, addWarning);
|
|
463
|
+
}
|
|
464
|
+
return extractedStyle;
|
|
465
|
+
}
|
|
466
|
+
//# sourceMappingURL=compiler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_debug","require","_lightningcss","_specificity","_add","_containerQuery","_declarations","_keyframes","_mediaQuery","_selectors","compile","code","logger","debug","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","lightningcss","filename","TextEncoder","encode","visitor","Declaration","decl","property","StyleSheetExit","sheet","length","rule","extractRule","customAtRules","prelude","body","size","ruleSets","styles","normal","important","style","s","Specificity","Important","push","stylesheetOptions","Array","from","k","keys","vr","entries","vu","partialStyle","extractKeyFrames","extractedContainer","extractMedia","declarations","getExtractedStyles","parseReactNativeStyleAtRule","setStyleForSelectorList","selectors","isReactNativeAtRule","extractReactNativeOptions","declaration","mapping","components","values","index","toRNProperty","mediaRule","media","mediaQuery","query","mediaQueries","mediaType","qualifier","condition","add","addWarning","m","map","parseMediaQuery","filter","undefined","containerRule","parseContainerCondition","n","cq","extractedStyle","selectorList","getSelectors","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","buildAddFn","parseDeclaration"],"s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BAAW,CAAC2E,KAAK,CAAC,GAAG1H,UAAU,CAACO,eAAe;EAE3D,IAAIiH,gBAAgB,CAAC1D,YAAY,IAAI0D,gBAAgB,CAAC1D,YAAY,CAAC5B,MAAM,EAAE;IACzEuF,eAAe,CAACxE,IAAI,CAClB0E,mBAAmB,CACjBH,gBAAgB,CAAC1D,YAAY,EAC7B9D,UAAU,EACV0G,WAAW,EACXpC,OACF,CACF,CAAC;EACH;EAEA,IACEkD,gBAAgB,CAACI,qBAAqB,IACtCJ,gBAAgB,CAACI,qBAAqB,CAAC1F,MAAM,EAC7C;IACAwE,WAAW,CAAC3D,wBAAW,CAACC,SAAS,CAAC,GAAG,CAAC;IACtCyE,eAAe,CAACxE,IAAI,CAClB0E,mBAAmB,CACjBH,gBAAgB,CAACI,qBAAqB,EACtC5H,UAAU,EACV0G,WAAW,EACXpC,OACF,CACF,CAAC;EACH;EAEA,OAAOmD,eAAe;AACxB;AAEA,SAASE,mBAAmBA,CAC1B7D,YAA2B,EAC3B9D,UAA8B,EAC9B0G,WAA6B,EAC7BpC,OAAyB,EACd;EACX,MAAMwB,cAAyB,GAAG;IAChChD,CAAC,EAAE,CAAC,GAAG4D,WAAW;EACpB,CAAC;EAED,MAAMmB,uBAAgD,GAAG;IACvD,GAAG7H;EACL,CAAC;EAED,MAAMoF,UAAwB,GAAGA,CAAA,KAAM;IACrC;EAAA,CACD;EAED,MAAM0C,KAAK,GAAG,IAAAC,eAAU,EAACjC,cAAc,EAAE9F,UAAU,EAAEsE,OAAO,CAAC;EAE7D,KAAK,MAAMD,WAAW,IAAIP,YAAY,EAAE;IACtC,IAAAkE,8BAAgB,EAAC3D,WAAW,EAAEwD,uBAAuB,EAAEC,KAAK,EAAE1C,UAAU,CAAC;EAC3E;EAEA,OAAOU,cAAc;AACvB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactivity","require"],"sourceRoot":"../../../src","sources":["compiler/compiler.types.ts"],"mappings":";;AAQA,IAAAA,WAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.parseContainerCondition = parseContainerCondition;
|
|
7
|
+
var _mediaQuery = require("./media-query.js");
|
|
8
|
+
/* eslint-disable */
|
|
9
|
+
|
|
10
|
+
function parseContainerCondition(condition, options) {
|
|
11
|
+
let containerQuery = parseContainerQueryCondition(condition, options);
|
|
12
|
+
|
|
13
|
+
// If any of these are undefined, the media query is invalid
|
|
14
|
+
if (!containerQuery || containerQuery.some(v => v === undefined)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
return containerQuery;
|
|
18
|
+
}
|
|
19
|
+
function parseContainerQueryCondition(condition, options) {
|
|
20
|
+
switch (condition.type) {
|
|
21
|
+
case "feature":
|
|
22
|
+
return parseFeature(condition.value, options);
|
|
23
|
+
case "not":
|
|
24
|
+
const query = parseContainerCondition(condition.value, options);
|
|
25
|
+
return query ? ["!", query] : undefined;
|
|
26
|
+
case "operation":
|
|
27
|
+
const conditions = condition.conditions.map(c => parseContainerQueryCondition(c, options)).filter(v => !!v);
|
|
28
|
+
if (conditions.length === 0) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
switch (condition.operator) {
|
|
32
|
+
case "and":
|
|
33
|
+
return ["&", conditions];
|
|
34
|
+
case "or":
|
|
35
|
+
return ["|", conditions];
|
|
36
|
+
default:
|
|
37
|
+
condition.operator;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
case "style":
|
|
41
|
+
// We don't support these yet
|
|
42
|
+
return;
|
|
43
|
+
default:
|
|
44
|
+
condition;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function parseFeature(feature, options) {
|
|
49
|
+
switch (feature.type) {
|
|
50
|
+
case "boolean":
|
|
51
|
+
return ["!!", feature.name];
|
|
52
|
+
case "plain":
|
|
53
|
+
return ["=", feature.name, (0, _mediaQuery.parseMediaFeatureValue)(feature.value, options)];
|
|
54
|
+
case "range":
|
|
55
|
+
return [(0, _mediaQuery.parseMediaFeatureOperator)(feature.operator), feature.name, (0, _mediaQuery.parseMediaFeatureValue)(feature.value, options)];
|
|
56
|
+
case "interval":
|
|
57
|
+
return ["[]", feature.name, (0, _mediaQuery.parseMediaFeatureValue)(feature.start, options), (0, _mediaQuery.parseMediaFeatureOperator)(feature.startOperator), (0, _mediaQuery.parseMediaFeatureValue)(feature.end, options), (0, _mediaQuery.parseMediaFeatureOperator)(feature.endOperator)];
|
|
58
|
+
default:
|
|
59
|
+
feature;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=container-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_mediaQuery","require","parseContainerCondition","condition","options","containerQuery","parseContainerQueryCondition","some","v","undefined","type","parseFeature","value","query","conditions","map","c","filter","length","operator","feature","name","parseMediaFeatureValue","parseMediaFeatureOperator","start","startOperator","end","endOperator"],"sourceRoot":"../../../src","sources":["compiler/container-query.ts"],"mappings":";;;;;;AAQA,IAAAA,WAAA,GAAAC,OAAA;AARA;;AAaO,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;EAC5B,QAAQD,SAAS,CAACO,IAAI;IACpB,KAAK,SAAS;MACZ,OAAOC,YAAY,CAACR,SAAS,CAACS,KAAK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