react-native-css 2.1.2 → 3.0.0-nightly.26b272f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE.md → LICENSE} +6 -8
- package/README.md +177 -70
- package/dist/commonjs/babel/allowedModules.js +23 -0
- package/dist/commonjs/babel/allowedModules.js.map +1 -0
- package/dist/commonjs/babel/helpers.js +25 -0
- package/dist/commonjs/babel/helpers.js.map +1 -0
- package/dist/commonjs/babel/import-plugin.js +101 -0
- package/dist/commonjs/babel/import-plugin.js.map +1 -0
- package/dist/commonjs/babel/index.js +9 -0
- package/dist/commonjs/babel/index.js.map +1 -0
- package/dist/commonjs/babel/react-native-web.js +118 -0
- package/dist/commonjs/babel/react-native-web.js.map +1 -0
- package/dist/commonjs/babel/react-native.js +118 -0
- package/dist/commonjs/babel/react-native.js.map +1 -0
- package/dist/commonjs/compiler/atRules.js +101 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -0
- package/dist/commonjs/compiler/attributes.test.js +20 -0
- package/dist/commonjs/compiler/attributes.test.js.map +1 -0
- package/dist/commonjs/compiler/compiler.js +274 -0
- package/dist/commonjs/compiler/compiler.js.map +1 -0
- package/dist/commonjs/compiler/compiler.types.js +4 -0
- package/dist/commonjs/compiler/compiler.types.js.map +1 -0
- package/dist/commonjs/compiler/container-query.js +63 -0
- package/dist/commonjs/compiler/container-query.js.map +1 -0
- package/dist/commonjs/compiler/declarations.js +2167 -0
- package/dist/commonjs/compiler/declarations.js.map +1 -0
- package/dist/commonjs/compiler/functions-web.js +44 -0
- package/dist/commonjs/compiler/functions-web.js.map +1 -0
- package/dist/commonjs/compiler/functions.js +59 -0
- package/dist/commonjs/compiler/functions.js.map +1 -0
- package/dist/commonjs/compiler/index.js +17 -0
- package/dist/commonjs/compiler/index.js.map +1 -0
- package/dist/commonjs/compiler/inheritance.test.js +78 -0
- package/dist/commonjs/compiler/inheritance.test.js.map +1 -0
- package/dist/commonjs/compiler/keyframes.js +60 -0
- package/dist/commonjs/compiler/keyframes.js.map +1 -0
- package/dist/commonjs/compiler/media-query.js +172 -0
- package/dist/commonjs/compiler/media-query.js.map +1 -0
- package/dist/commonjs/compiler/selector-builder.js +457 -0
- package/dist/commonjs/compiler/selector-builder.js.map +1 -0
- package/dist/commonjs/compiler/selectors.js +414 -0
- package/dist/commonjs/compiler/selectors.js.map +1 -0
- package/dist/commonjs/compiler/split-by-delimiter.js +21 -0
- package/dist/commonjs/compiler/split-by-delimiter.js.map +1 -0
- package/dist/commonjs/compiler/stylesheet.js +459 -0
- package/dist/commonjs/compiler/stylesheet.js.map +1 -0
- package/dist/commonjs/components/Text.js +17 -0
- package/dist/commonjs/components/Text.js.map +1 -0
- package/dist/commonjs/components/View.js +17 -0
- package/dist/commonjs/components/View.js.map +1 -0
- package/dist/commonjs/components/index.js +36 -0
- package/dist/commonjs/components/index.js.map +1 -0
- package/dist/commonjs/doctor/index.js +6 -0
- package/dist/commonjs/doctor/index.js.map +1 -0
- package/dist/commonjs/index.js +28 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/jest/expect.d.js +2 -0
- package/dist/commonjs/jest/expect.d.js.map +1 -0
- package/dist/commonjs/jest/index.js +49 -0
- package/dist/commonjs/jest/index.js.map +1 -0
- package/dist/commonjs/jest/setup.js +3 -0
- package/dist/commonjs/jest/setup.js.map +1 -0
- package/dist/commonjs/jest/setupAfterEnv.js +15 -0
- package/dist/commonjs/jest/setupAfterEnv.js.map +1 -0
- package/dist/commonjs/metro/index.js +167 -0
- package/dist/commonjs/metro/index.js.map +1 -0
- package/dist/commonjs/metro/injection-code.js +32 -0
- package/dist/commonjs/metro/injection-code.js.map +1 -0
- package/dist/commonjs/metro/metro-transformer.js +21 -0
- package/dist/commonjs/metro/metro-transformer.js.map +1 -0
- package/dist/commonjs/metro/picocolors.js +71 -0
- package/dist/commonjs/metro/picocolors.js.map +1 -0
- package/dist/commonjs/metro/resolver.js +62 -0
- package/dist/commonjs/metro/resolver.js.map +1 -0
- package/dist/commonjs/metro/stringify.js +59 -0
- package/dist/commonjs/metro/stringify.js.map +1 -0
- package/dist/commonjs/metro/typescript.js +47 -0
- package/dist/commonjs/metro/typescript.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/poison.pill.js +39 -0
- package/dist/commonjs/poison.pill.js.map +1 -0
- package/dist/commonjs/runtime/index.js +17 -0
- package/dist/commonjs/runtime/index.js.map +1 -0
- package/dist/commonjs/runtime/native/api.js +90 -0
- package/dist/commonjs/runtime/native/api.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/attributes.js +42 -0
- package/dist/commonjs/runtime/native/conditions/attributes.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js +123 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/guards.js +33 -0
- package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/index.js +38 -0
- package/dist/commonjs/runtime/native/conditions/index.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js +93 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/commonjs/runtime/native/index.js +28 -0
- package/dist/commonjs/runtime/native/index.js.map +1 -0
- package/dist/commonjs/runtime/native/injection.js +99 -0
- package/dist/commonjs/runtime/native/injection.js.map +1 -0
- package/dist/commonjs/runtime/native/metro.js +6 -0
- package/dist/commonjs/runtime/native/metro.js.map +1 -0
- package/dist/commonjs/runtime/native/react/interaction.js +63 -0
- package/dist/commonjs/runtime/native/react/interaction.js.map +1 -0
- package/dist/commonjs/runtime/native/react/rules.js +253 -0
- package/dist/commonjs/runtime/native/react/rules.js.map +1 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js +159 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js +50 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/commonjs/runtime/native/reactivity.js +178 -0
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -0
- package/dist/commonjs/runtime/native/root.js +28 -0
- package/dist/commonjs/runtime/native/root.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/animation.js +88 -0
- package/dist/commonjs/runtime/native/styles/animation.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/border.js +12 -0
- package/dist/commonjs/runtime/native/styles/border.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js +40 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calc.js +85 -0
- package/dist/commonjs/runtime/native/styles/calc.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js +128 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/constants.js +9 -0
- package/dist/commonjs/runtime/native/styles/constants.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/defaults.js +69 -0
- package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/filters.js +84 -0
- package/dist/commonjs/runtime/native/styles/filters.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/index.js +115 -0
- package/dist/commonjs/runtime/native/styles/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/platform-functions.js +46 -0
- package/dist/commonjs/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +129 -0
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthand.js +79 -0
- package/dist/commonjs/runtime/native/styles/shorthand.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/text-shadow.js +13 -0
- package/dist/commonjs/runtime/native/styles/text-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/transform.js +23 -0
- package/dist/commonjs/runtime/native/styles/transform.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/units.js +52 -0
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/variables.js +79 -0
- package/dist/commonjs/runtime/native/styles/variables.js.map +1 -0
- package/dist/commonjs/runtime/runtime.js +17 -0
- package/dist/commonjs/runtime/runtime.js.map +1 -0
- package/dist/commonjs/runtime/runtime.native.js +17 -0
- package/dist/commonjs/runtime/runtime.native.js.map +1 -0
- package/dist/commonjs/runtime/runtime.types.js +6 -0
- package/dist/commonjs/runtime/runtime.types.js.map +1 -0
- package/dist/commonjs/runtime/utils/components.js +18 -0
- package/dist/commonjs/runtime/utils/components.js.map +1 -0
- package/dist/commonjs/runtime/utils/dot-notation.types.js +2 -0
- package/dist/commonjs/runtime/utils/dot-notation.types.js.map +1 -0
- package/dist/commonjs/runtime/utils/index.js +61 -0
- package/dist/commonjs/runtime/utils/index.js.map +1 -0
- package/dist/commonjs/runtime/utils/objects.js +84 -0
- package/dist/commonjs/runtime/utils/objects.js.map +1 -0
- package/dist/commonjs/runtime/utils/specificity.js +44 -0
- package/dist/commonjs/runtime/utils/specificity.js.map +1 -0
- package/dist/commonjs/runtime/utils/style-value.js +21 -0
- package/dist/commonjs/runtime/utils/style-value.js.map +1 -0
- package/dist/commonjs/runtime/utils/utils.types.js +6 -0
- package/dist/commonjs/runtime/utils/utils.types.js.map +1 -0
- package/dist/commonjs/runtime/web/api.js +68 -0
- package/dist/commonjs/runtime/web/api.js.map +1 -0
- package/dist/commonjs/runtime/web/assign-style.js +27 -0
- package/dist/commonjs/runtime/web/assign-style.js.map +1 -0
- package/dist/commonjs/runtime/web/index.js +18 -0
- package/dist/commonjs/runtime/web/index.js.map +1 -0
- package/dist/commonjs/runtime/web/metro.js +6 -0
- package/dist/commonjs/runtime/web/metro.js.map +1 -0
- package/dist/module/babel/allowedModules.js +19 -0
- package/dist/module/babel/allowedModules.js.map +1 -0
- package/dist/module/babel/helpers.js +21 -0
- package/dist/module/babel/helpers.js.map +1 -0
- package/dist/module/babel/import-plugin.js +97 -0
- package/dist/module/babel/import-plugin.js.map +1 -0
- package/dist/module/babel/index.js +9 -0
- package/dist/module/babel/index.js.map +1 -0
- package/dist/module/babel/react-native-web.js +112 -0
- package/dist/module/babel/react-native-web.js.map +1 -0
- package/dist/module/babel/react-native.js +112 -0
- package/dist/module/babel/react-native.js.map +1 -0
- package/dist/module/compiler/atRules.js +97 -0
- package/dist/module/compiler/atRules.js.map +1 -0
- package/dist/module/compiler/attributes.test.js +20 -0
- package/dist/module/compiler/attributes.test.js.map +1 -0
- package/dist/module/compiler/compiler.js +269 -0
- package/dist/module/compiler/compiler.js.map +1 -0
- package/dist/module/compiler/compiler.types.js +60 -0
- package/dist/module/compiler/compiler.types.js.map +1 -0
- package/dist/module/compiler/container-query.js +59 -0
- package/dist/module/compiler/container-query.js.map +1 -0
- package/dist/module/compiler/declarations.js +2092 -0
- package/dist/module/compiler/declarations.js.map +1 -0
- package/dist/module/compiler/functions-web.js +32 -0
- package/dist/module/compiler/functions-web.js.map +1 -0
- package/dist/module/compiler/functions.js +47 -0
- package/dist/module/compiler/functions.js.map +1 -0
- package/dist/module/compiler/index.js +9 -0
- package/dist/module/compiler/index.js.map +1 -0
- package/dist/module/compiler/inheritance.test.js +78 -0
- package/dist/module/compiler/inheritance.test.js.map +1 -0
- package/dist/module/compiler/keyframes.js +54 -0
- package/dist/module/compiler/keyframes.js.map +1 -0
- package/dist/module/compiler/media-query.js +166 -0
- package/dist/module/compiler/media-query.js.map +1 -0
- package/dist/module/compiler/selector-builder.js +452 -0
- package/dist/module/compiler/selector-builder.js.map +1 -0
- package/dist/module/compiler/selectors.js +409 -0
- package/dist/module/compiler/selectors.js.map +1 -0
- package/dist/module/compiler/split-by-delimiter.js +17 -0
- package/dist/module/compiler/split-by-delimiter.js.map +1 -0
- package/dist/module/compiler/stylesheet.js +454 -0
- package/dist/module/compiler/stylesheet.js.map +1 -0
- package/dist/module/components/Text.js +12 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/View.js +12 -0
- package/dist/module/components/View.js.map +1 -0
- package/dist/module/components/index.js +6 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/doctor/index.js +4 -0
- package/dist/module/doctor/index.js.map +1 -0
- package/dist/module/index.js +5 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/jest/expect.d.js +2 -0
- package/dist/module/jest/expect.d.js.map +1 -0
- package/dist/module/jest/index.js +44 -0
- package/dist/module/jest/index.js.map +1 -0
- package/dist/module/jest/setup.js +3 -0
- package/dist/module/jest/setup.js.map +1 -0
- package/dist/module/jest/setupAfterEnv.js +15 -0
- package/dist/module/jest/setupAfterEnv.js.map +1 -0
- package/dist/module/metro/index.js +161 -0
- package/dist/module/metro/index.js.map +1 -0
- package/dist/module/metro/injection-code.js +27 -0
- package/dist/module/metro/injection-code.js.map +1 -0
- package/dist/module/metro/metro-transformer.js +17 -0
- package/dist/module/metro/metro-transformer.js.map +1 -0
- package/dist/module/metro/picocolors.js +67 -0
- package/dist/module/metro/picocolors.js.map +1 -0
- package/dist/module/metro/resolver.js +57 -0
- package/dist/module/metro/resolver.js.map +1 -0
- package/dist/module/metro/stringify.js +55 -0
- package/dist/module/metro/stringify.js.map +1 -0
- package/dist/module/metro/typescript.js +42 -0
- package/dist/module/metro/typescript.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/poison.pill.js +37 -0
- package/dist/module/poison.pill.js.map +1 -0
- package/dist/module/runtime/index.js +9 -0
- package/dist/module/runtime/index.js.map +1 -0
- package/dist/module/runtime/native/api.js +75 -0
- package/dist/module/runtime/native/api.js.map +1 -0
- package/dist/module/runtime/native/conditions/attributes.js +38 -0
- package/dist/module/runtime/native/conditions/attributes.js.map +1 -0
- package/dist/module/runtime/native/conditions/container-query.js +117 -0
- package/dist/module/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/module/runtime/native/conditions/guards.js +29 -0
- package/dist/module/runtime/native/conditions/guards.js.map +1 -0
- package/dist/module/runtime/native/conditions/index.js +34 -0
- package/dist/module/runtime/native/conditions/index.js.map +1 -0
- package/dist/module/runtime/native/conditions/media-query.js +88 -0
- package/dist/module/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/module/runtime/native/index.js +5 -0
- package/dist/module/runtime/native/index.js.map +1 -0
- package/dist/module/runtime/native/injection.js +94 -0
- package/dist/module/runtime/native/injection.js.map +1 -0
- package/dist/module/runtime/native/metro.js +5 -0
- package/dist/module/runtime/native/metro.js.map +1 -0
- package/dist/module/runtime/native/react/interaction.js +59 -0
- package/dist/module/runtime/native/react/interaction.js.map +1 -0
- package/dist/module/runtime/native/react/rules.js +246 -0
- package/dist/module/runtime/native/react/rules.js.map +1 -0
- package/dist/module/runtime/native/react/useNativeCss.js +153 -0
- package/dist/module/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/module/runtime/native/react/usePassthrough.js +45 -0
- package/dist/module/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/module/runtime/native/reactivity.js +166 -0
- package/dist/module/runtime/native/reactivity.js.map +1 -0
- package/dist/module/runtime/native/root.js +24 -0
- package/dist/module/runtime/native/root.js.map +1 -0
- package/dist/module/runtime/native/styles/animation.js +82 -0
- package/dist/module/runtime/native/styles/animation.js.map +1 -0
- package/dist/module/runtime/native/styles/border.js +8 -0
- package/dist/module/runtime/native/styles/border.js.map +1 -0
- package/dist/module/runtime/native/styles/box-shadow.js +35 -0
- package/dist/module/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/calc.js +79 -0
- package/dist/module/runtime/native/styles/calc.js.map +1 -0
- package/dist/module/runtime/native/styles/calculate-props.js +123 -0
- package/dist/module/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/module/runtime/native/styles/constants.js +5 -0
- package/dist/module/runtime/native/styles/constants.js.map +1 -0
- package/dist/module/runtime/native/styles/defaults.js +65 -0
- package/dist/module/runtime/native/styles/defaults.js.map +1 -0
- package/dist/module/runtime/native/styles/filters.js +70 -0
- package/dist/module/runtime/native/styles/filters.js.map +1 -0
- package/dist/module/runtime/native/styles/index.js +110 -0
- package/dist/module/runtime/native/styles/index.js.map +1 -0
- package/dist/module/runtime/native/styles/platform-functions.js +36 -0
- package/dist/module/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +125 -0
- package/dist/module/runtime/native/styles/resolve.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthand.js +74 -0
- package/dist/module/runtime/native/styles/shorthand.js.map +1 -0
- package/dist/module/runtime/native/styles/text-shadow.js +9 -0
- package/dist/module/runtime/native/styles/text-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/transform.js +18 -0
- package/dist/module/runtime/native/styles/transform.js.map +1 -0
- package/dist/module/runtime/native/styles/units.js +43 -0
- package/dist/module/runtime/native/styles/units.js.map +1 -0
- package/dist/module/runtime/native/styles/variables.js +75 -0
- package/dist/module/runtime/native/styles/variables.js.map +1 -0
- package/dist/module/runtime/runtime.js +4 -0
- package/dist/module/runtime/runtime.js.map +1 -0
- package/dist/module/runtime/runtime.native.js +4 -0
- package/dist/module/runtime/runtime.native.js.map +1 -0
- package/dist/module/runtime/runtime.types.js +4 -0
- package/dist/module/runtime/runtime.types.js.map +1 -0
- package/dist/module/runtime/utils/components.js +14 -0
- package/dist/module/runtime/utils/components.js.map +1 -0
- package/dist/module/runtime/utils/dot-notation.types.js +2 -0
- package/dist/module/runtime/utils/dot-notation.types.js.map +1 -0
- package/dist/module/runtime/utils/index.js +8 -0
- package/dist/module/runtime/utils/index.js.map +1 -0
- package/dist/module/runtime/utils/objects.js +76 -0
- package/dist/module/runtime/utils/objects.js.map +1 -0
- package/dist/module/runtime/utils/specificity.js +39 -0
- package/dist/module/runtime/utils/specificity.js.map +1 -0
- package/dist/module/runtime/utils/style-value.js +16 -0
- package/dist/module/runtime/utils/style-value.js.map +1 -0
- package/dist/module/runtime/utils/utils.types.js +4 -0
- package/dist/module/runtime/utils/utils.types.js.map +1 -0
- package/dist/module/runtime/web/api.js +59 -0
- package/dist/module/runtime/web/api.js.map +1 -0
- package/dist/module/runtime/web/assign-style.js +23 -0
- package/dist/module/runtime/web/assign-style.js.map +1 -0
- package/dist/module/runtime/web/index.js +6 -0
- package/dist/module/runtime/web/index.js.map +1 -0
- package/dist/module/runtime/web/metro.js +5 -0
- package/dist/module/runtime/web/metro.js.map +1 -0
- package/dist/typescript/commonjs/example/app.config.d.ts +4 -0
- package/dist/typescript/commonjs/example/app.config.d.ts.map +1 -0
- package/dist/typescript/commonjs/example/src/App.d.ts +3 -0
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +17 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +199 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +118 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +23 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts +24 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +68 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/View.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/doctor/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/doctor/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/index.d.ts +3 -0
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts +20 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts +11 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts +16 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts +2 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +38 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +55 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/root.d.ts +11 -0
- package/dist/typescript/commonjs/src/runtime/native/root.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +9 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts +12 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts +11 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/runtime.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts +47 -0
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts +23 -0
- package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +13 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts.map +1 -0
- package/dist/typescript/module/example/app.config.d.ts +4 -0
- package/dist/typescript/module/example/app.config.d.ts.map +1 -0
- package/dist/typescript/module/example/src/App.d.ts +3 -0
- package/dist/typescript/module/example/src/App.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/index.d.ts +1 -0
- package/dist/typescript/module/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/attributes.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts +17 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +199 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts +118 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/index.d.ts +7 -0
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +23 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts +24 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts +2 -0
- package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +68 -0
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Text.d.ts +8 -0
- package/dist/typescript/module/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/module/src/components/View.d.ts +8 -0
- package/dist/typescript/module/src/components/View.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +4 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -0
- package/dist/typescript/module/src/doctor/index.d.ts +2 -0
- package/dist/typescript/module/src/doctor/index.d.ts.map +1 -0
- package/dist/typescript/module/src/index.d.ts +3 -0
- package/dist/typescript/module/src/index.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/index.d.ts +20 -0
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +11 -0
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts +16 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/module/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/module/src/poison.pill.d.ts +2 -0
- package/dist/typescript/module/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/index.d.ts +7 -0
- package/dist/typescript/module/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/conditions/attributes.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +38 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +55 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/root.d.ts +11 -0
- package/dist/typescript/module/src/runtime/native/root.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +9 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts +12 -0
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts +11 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.d.ts +2 -0
- package/dist/typescript/module/src/runtime/runtime.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.native.d.ts +2 -0
- package/dist/typescript/module/src/runtime/runtime.native.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.types.d.ts +47 -0
- package/dist/typescript/module/src/runtime/runtime.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/components.d.ts +2 -0
- package/dist/typescript/module/src/runtime/utils/components.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts +23 -0
- package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/utils/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/objects.d.ts +5 -0
- package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts +13 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts.map +1 -0
- package/package.json +246 -47
- package/src/babel/allowedModules.ts +24 -0
- package/src/babel/helpers.ts +40 -0
- package/src/babel/import-plugin.ts +176 -0
- package/src/babel/index.ts +9 -0
- package/src/babel/react-native-web.ts +226 -0
- package/src/babel/react-native.ts +226 -0
- package/src/compiler/atRules.ts +144 -0
- package/src/compiler/attributes.test.ts +28 -0
- package/src/compiler/compiler.ts +298 -0
- package/src/compiler/compiler.types.ts +269 -0
- package/src/compiler/container-query.ts +97 -0
- package/src/compiler/declarations.ts +3124 -0
- package/src/compiler/functions-web.ts +44 -0
- package/src/compiler/functions.ts +64 -0
- package/src/compiler/index.ts +7 -0
- package/src/compiler/inheritance.test.ts +121 -0
- package/src/compiler/keyframes.ts +86 -0
- package/src/compiler/media-query.ts +251 -0
- package/src/compiler/selector-builder.ts +531 -0
- package/src/compiler/selectors.ts +505 -0
- package/src/compiler/split-by-delimiter.ts +19 -0
- package/src/compiler/stylesheet.ts +655 -0
- package/src/components/Text.tsx +17 -0
- package/src/components/View.tsx +17 -0
- package/src/components/index.tsx +4 -0
- package/src/doctor/index.ts +1 -0
- package/src/index.ts +3 -0
- package/src/jest/expect.d.ts +1 -0
- package/src/jest/index.ts +65 -0
- package/src/jest/setup.ts +1 -0
- package/src/jest/setupAfterEnv.ts +13 -0
- package/src/metro/index.ts +237 -0
- package/src/metro/injection-code.ts +38 -0
- package/src/metro/metro-transformer.ts +31 -0
- package/src/metro/picocolors.ts +77 -0
- package/src/metro/resolver.ts +89 -0
- package/src/metro/stringify.ts +59 -0
- package/src/metro/typescript.ts +73 -0
- package/src/poison.pill.ts +36 -0
- package/src/runtime/index.ts +7 -0
- package/src/runtime/native/api.ts +106 -0
- package/src/runtime/native/conditions/attributes.ts +52 -0
- package/src/runtime/native/conditions/container-query.ts +162 -0
- package/src/runtime/native/conditions/guards.ts +44 -0
- package/src/runtime/native/conditions/index.ts +52 -0
- package/src/runtime/native/conditions/media-query.ts +92 -0
- package/src/runtime/native/index.ts +4 -0
- package/src/runtime/native/injection.ts +131 -0
- package/src/runtime/native/metro.ts +2 -0
- package/src/runtime/native/react/interaction.ts +90 -0
- package/src/runtime/native/react/rules.ts +326 -0
- package/src/runtime/native/react/useNativeCss.ts +203 -0
- package/src/runtime/native/react/usePassthrough.ts +51 -0
- package/src/runtime/native/reactivity.ts +243 -0
- package/src/runtime/native/root.ts +31 -0
- package/src/runtime/native/styles/animation.ts +181 -0
- package/src/runtime/native/styles/border.ts +10 -0
- package/src/runtime/native/styles/box-shadow.ts +54 -0
- package/src/runtime/native/styles/calc.ts +97 -0
- package/src/runtime/native/styles/calculate-props.ts +175 -0
- package/src/runtime/native/styles/constants.ts +2 -0
- package/src/runtime/native/styles/defaults.ts +78 -0
- package/src/runtime/native/styles/filters.ts +98 -0
- package/src/runtime/native/styles/index.ts +197 -0
- package/src/runtime/native/styles/platform-functions.ts +50 -0
- package/src/runtime/native/styles/resolve.ts +205 -0
- package/src/runtime/native/styles/shorthand.ts +121 -0
- package/src/runtime/native/styles/text-shadow.ts +17 -0
- package/src/runtime/native/styles/transform.ts +21 -0
- package/src/runtime/native/styles/units.ts +57 -0
- package/src/runtime/native/styles/variables.ts +84 -0
- package/src/runtime/runtime.native.ts +1 -0
- package/src/runtime/runtime.ts +1 -0
- package/src/runtime/runtime.types.ts +130 -0
- package/src/runtime/utils/components.ts +15 -0
- package/src/runtime/utils/dot-notation.types.ts +118 -0
- package/src/runtime/utils/index.ts +5 -0
- package/src/runtime/utils/objects.ts +97 -0
- package/src/runtime/utils/specificity.ts +45 -0
- package/src/runtime/utils/style-value.ts +24 -0
- package/src/runtime/utils/utils.types.ts +19 -0
- package/src/runtime/web/api.ts +88 -0
- package/src/runtime/web/assign-style.ts +26 -0
- package/src/runtime/web/index.ts +5 -0
- package/src/runtime/web/metro.ts +2 -0
- package/types.d.ts +70 -0
- package/.babelrc +0 -17
- package/.editorconfig +0 -17
- package/.eslintignore +0 -3
- package/.eslintrc +0 -39
- package/.npmignore +0 -7
- package/build/index.js +0 -299
- package/build/utils.js +0 -61
- package/circle.yml +0 -31
- package/jsconfig.json +0 -9
- package/login.sh +0 -11
- package/src/index.js +0 -184
- package/src/utils.js +0 -32
- package/test/rnc.test.js +0 -258
- package/yarn.lock +0 -3333
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
import type { Selector, SelectorList } from "lightningcss";
|
|
2
|
+
|
|
3
|
+
import { Specificity } from "../runtime/utils";
|
|
4
|
+
import type {
|
|
5
|
+
AttributeQuery,
|
|
6
|
+
AttrSelectorOperator,
|
|
7
|
+
CompilerOptions,
|
|
8
|
+
ContainerQuery,
|
|
9
|
+
MediaCondition,
|
|
10
|
+
PseudoClassesQuery,
|
|
11
|
+
SpecificityArray,
|
|
12
|
+
} from "./compiler.types";
|
|
13
|
+
|
|
14
|
+
interface ReactNativeClassNameSelector {
|
|
15
|
+
type: "className";
|
|
16
|
+
specificity: SpecificityArray;
|
|
17
|
+
className: string;
|
|
18
|
+
mediaQuery?: MediaCondition[];
|
|
19
|
+
containerQuery?: ContainerQuery[];
|
|
20
|
+
pseudoClassesQuery?: PseudoClassesQuery;
|
|
21
|
+
attributeQuery?: AttributeQuery[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface ReactNativeGlobalSelector {
|
|
25
|
+
type: "rootVariables" | "universalVariables";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type PartialSelector = Partial<ReactNativeClassNameSelector> & {
|
|
29
|
+
type: "className";
|
|
30
|
+
specificity: SpecificityArray;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const containerQueryMap = new WeakMap<WeakKey, ContainerQuery[]>();
|
|
34
|
+
const attributeQueryMap = new WeakMap<WeakKey, AttributeQuery[]>();
|
|
35
|
+
const pseudoClassesQueryMap = new WeakMap<WeakKey, PseudoClassesQuery>();
|
|
36
|
+
|
|
37
|
+
type ContainerQueryWithSpecificity = ContainerQuery & {
|
|
38
|
+
specificity: SpecificityArray;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export function getClassNameSelectors(
|
|
42
|
+
selectors: SelectorList,
|
|
43
|
+
options: CompilerOptions = {},
|
|
44
|
+
specificity: SpecificityArray = [0],
|
|
45
|
+
root: PartialSelector = {
|
|
46
|
+
type: "className",
|
|
47
|
+
specificity: [],
|
|
48
|
+
},
|
|
49
|
+
) {
|
|
50
|
+
if (!selectors.length) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return selectors.flatMap(
|
|
55
|
+
(selector): (ReactNativeGlobalSelector | PartialSelector)[] => {
|
|
56
|
+
if (isRootVariableSelector(selector)) {
|
|
57
|
+
return [{ type: "rootVariables" }];
|
|
58
|
+
} else {
|
|
59
|
+
return (
|
|
60
|
+
parseComponents(
|
|
61
|
+
selector.reverse(),
|
|
62
|
+
options,
|
|
63
|
+
root,
|
|
64
|
+
root,
|
|
65
|
+
specificity,
|
|
66
|
+
) ?? []
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function parseComponents(
|
|
74
|
+
[component, ...rest]: Selector,
|
|
75
|
+
options: CompilerOptions,
|
|
76
|
+
root: PartialSelector,
|
|
77
|
+
ref: PartialSelector | ContainerQuery,
|
|
78
|
+
specificity: SpecificityArray,
|
|
79
|
+
): PartialSelector[] | null {
|
|
80
|
+
if (!component || Array.isArray(component.type)) {
|
|
81
|
+
// Merge the specificity with the root specificity
|
|
82
|
+
for (let i = 0; i < specificity.length; i++) {
|
|
83
|
+
const value = specificity[i];
|
|
84
|
+
if (value !== undefined) {
|
|
85
|
+
root.specificity[i] = (root.specificity[i] ?? 0) + value;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Return the root
|
|
90
|
+
return [root];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
switch (component.type) {
|
|
94
|
+
case "id": // #id
|
|
95
|
+
case "namespace": // @namespace
|
|
96
|
+
case "universal": // * - universal selector
|
|
97
|
+
return null;
|
|
98
|
+
case "type": {
|
|
99
|
+
// div, span
|
|
100
|
+
if (
|
|
101
|
+
component.name === options.selectorPrefix ||
|
|
102
|
+
component.name === "html"
|
|
103
|
+
) {
|
|
104
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
105
|
+
} else {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
case "nesting":
|
|
110
|
+
// &
|
|
111
|
+
// The SelectorList should be flattened, so we can skip these
|
|
112
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
113
|
+
case "combinator": {
|
|
114
|
+
// We only support the descendant combinator
|
|
115
|
+
if (component.value === "descendant") {
|
|
116
|
+
// Switch to now parsing a container query
|
|
117
|
+
ref = {};
|
|
118
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return [];
|
|
122
|
+
}
|
|
123
|
+
case "pseudo-element": {
|
|
124
|
+
// TODO: Support ::selection, ::placeholder, etc
|
|
125
|
+
return [];
|
|
126
|
+
}
|
|
127
|
+
case "pseudo-class": {
|
|
128
|
+
switch (component.kind) {
|
|
129
|
+
case "hover": {
|
|
130
|
+
getPseudoClassesQuery(ref).h = 1;
|
|
131
|
+
specificity[Specificity.PseudoClass] =
|
|
132
|
+
(specificity[Specificity.PseudoClass] ?? 0) + 1;
|
|
133
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
134
|
+
}
|
|
135
|
+
case "active": {
|
|
136
|
+
getPseudoClassesQuery(ref).a = 1;
|
|
137
|
+
specificity[Specificity.PseudoClass] =
|
|
138
|
+
(specificity[Specificity.PseudoClass] ?? 0) + 1;
|
|
139
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
140
|
+
}
|
|
141
|
+
case "focus": {
|
|
142
|
+
getPseudoClassesQuery(ref).f = 1;
|
|
143
|
+
specificity[Specificity.PseudoClass] =
|
|
144
|
+
(specificity[Specificity.PseudoClass] ?? 0) + 1;
|
|
145
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
146
|
+
}
|
|
147
|
+
case "disabled": {
|
|
148
|
+
getAttributeQuery(ref).push(["a", "disabled"]);
|
|
149
|
+
specificity[Specificity.PseudoClass] =
|
|
150
|
+
(specificity[Specificity.PseudoClass] ?? 0) + 1;
|
|
151
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
152
|
+
}
|
|
153
|
+
case "empty": {
|
|
154
|
+
getAttributeQuery(ref).push(["a", "children", "!"]);
|
|
155
|
+
specificity[Specificity.PseudoClass] =
|
|
156
|
+
(specificity[Specificity.PseudoClass] ?? 0) + 1;
|
|
157
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
158
|
+
}
|
|
159
|
+
case "where":
|
|
160
|
+
case "is": {
|
|
161
|
+
// Now get the selectors inside the `is` or `where` pseudo-class
|
|
162
|
+
const isWhereContainerQueries = component.selectors.flatMap(
|
|
163
|
+
(selector) => {
|
|
164
|
+
return parseIsWhereComponents(component.kind, selector) ?? [];
|
|
165
|
+
},
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
// Remember we're looping in reverse order,
|
|
169
|
+
// So `rest` contains the selectors BEFORE this one
|
|
170
|
+
const parents = parseComponents(
|
|
171
|
+
rest,
|
|
172
|
+
options,
|
|
173
|
+
root,
|
|
174
|
+
ref,
|
|
175
|
+
specificity,
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
if (!parents) {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Each parent selector should be combined with each pseudo-class selector
|
|
183
|
+
return parents.flatMap((parent) => {
|
|
184
|
+
const originalParent = { ...parent };
|
|
185
|
+
|
|
186
|
+
return isWhereContainerQueries.map(({ specificity, ...query }) => {
|
|
187
|
+
parent = { ...originalParent };
|
|
188
|
+
parent.specificity = [...originalParent.specificity];
|
|
189
|
+
parent.containerQuery = [
|
|
190
|
+
...(originalParent.containerQuery ?? []),
|
|
191
|
+
];
|
|
192
|
+
|
|
193
|
+
if (component.kind === "is") {
|
|
194
|
+
for (let i = 0; i < specificity.length; i++) {
|
|
195
|
+
const value = specificity[i];
|
|
196
|
+
if (value !== undefined) {
|
|
197
|
+
parent.specificity[i] =
|
|
198
|
+
(parent.specificity[i] ?? 0) + value;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
parent.containerQuery.push(query);
|
|
204
|
+
|
|
205
|
+
return parent;
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
default: {
|
|
210
|
+
return [];
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
case "attribute": {
|
|
215
|
+
// specificity[Specificity.ClassName] =
|
|
216
|
+
// (specificity[Specificity.ClassName] ?? 0) + 1;
|
|
217
|
+
const attributeQuery: AttributeQuery = component.name.startsWith("data-")
|
|
218
|
+
? // [data-*] are turned into `dataSet` queries
|
|
219
|
+
["d", toRNProperty(component.name.replace("data-", ""))]
|
|
220
|
+
: // Everything else is turned into `attribute` queries
|
|
221
|
+
["a", toRNProperty(component.name)];
|
|
222
|
+
if (component.operation) {
|
|
223
|
+
let operator: AttrSelectorOperator | undefined;
|
|
224
|
+
switch (component.operation.operator) {
|
|
225
|
+
case "equal":
|
|
226
|
+
operator = "=";
|
|
227
|
+
break;
|
|
228
|
+
case "includes":
|
|
229
|
+
operator = "~=";
|
|
230
|
+
break;
|
|
231
|
+
case "dash-match":
|
|
232
|
+
operator = "|=";
|
|
233
|
+
break;
|
|
234
|
+
case "prefix":
|
|
235
|
+
operator = "^=";
|
|
236
|
+
break;
|
|
237
|
+
case "substring":
|
|
238
|
+
operator = "*=";
|
|
239
|
+
break;
|
|
240
|
+
case "suffix":
|
|
241
|
+
operator = "$=";
|
|
242
|
+
break;
|
|
243
|
+
default:
|
|
244
|
+
component.operation.operator satisfies never;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
if (operator) {
|
|
248
|
+
// Append the operator onto the attribute query
|
|
249
|
+
attributeQuery.push(operator, component.operation.value);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
getAttributeQuery(ref).push(attributeQuery);
|
|
253
|
+
specificity[Specificity.ClassName] =
|
|
254
|
+
(specificity[Specificity.ClassName] ?? 0) + 1;
|
|
255
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
256
|
+
}
|
|
257
|
+
case "class": {
|
|
258
|
+
if (component.name === options.selectorPrefix) {
|
|
259
|
+
// Skip this one
|
|
260
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
261
|
+
} else if (!isContainerQuery(ref) && !ref.className) {
|
|
262
|
+
ref.className = component.name;
|
|
263
|
+
specificity[Specificity.ClassName] =
|
|
264
|
+
(specificity[Specificity.ClassName] ?? 0) + 1;
|
|
265
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
266
|
+
} else if (!isContainerQuery(ref)) {
|
|
267
|
+
// Only the first className is used, the rest are attribute queries
|
|
268
|
+
getAttributeQuery(ref).unshift([
|
|
269
|
+
"a",
|
|
270
|
+
"className",
|
|
271
|
+
"*=",
|
|
272
|
+
component.name,
|
|
273
|
+
]);
|
|
274
|
+
} else {
|
|
275
|
+
let containerQueries = containerQueryMap.get(root);
|
|
276
|
+
if (!containerQueries) {
|
|
277
|
+
containerQueries = [];
|
|
278
|
+
root.containerQuery = containerQueries;
|
|
279
|
+
containerQueryMap.set(root, containerQueries);
|
|
280
|
+
}
|
|
281
|
+
if (!ref.n) {
|
|
282
|
+
containerQueries.unshift(ref);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
ref.n = ref.n ? `${ref.n}.${component.name}` : component.name;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
specificity[Specificity.ClassName] =
|
|
289
|
+
(specificity[Specificity.ClassName] ?? 0) + 1;
|
|
290
|
+
return parseComponents(rest, options, root, ref, specificity);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function parseIsWhereComponents(
|
|
296
|
+
type: "is" | "where",
|
|
297
|
+
selector: Selector,
|
|
298
|
+
index = 0,
|
|
299
|
+
queries?: ContainerQueryWithSpecificity[],
|
|
300
|
+
): ContainerQueryWithSpecificity[] | null {
|
|
301
|
+
const component = selector[index];
|
|
302
|
+
|
|
303
|
+
if (!component || Array.isArray(component.type)) {
|
|
304
|
+
return queries ?? [];
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
switch (component.type) {
|
|
308
|
+
// These are not allowed in `is()` or `where()`
|
|
309
|
+
case "id": // #id
|
|
310
|
+
case "namespace": // @namespace
|
|
311
|
+
case "type": // div, span
|
|
312
|
+
case "nesting": // &
|
|
313
|
+
case "pseudo-element": // ::selection, ::placeholder, etc
|
|
314
|
+
return null;
|
|
315
|
+
case "combinator": {
|
|
316
|
+
// We only support the descendant combinator
|
|
317
|
+
if (component.value === "descendant") {
|
|
318
|
+
// Each "block" is a new container query
|
|
319
|
+
const children = parseIsWhereComponents(type, selector, index + 1);
|
|
320
|
+
return children && queries ? [...queries, ...children] : children;
|
|
321
|
+
}
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
case "universal": {
|
|
325
|
+
// * - universal selector
|
|
326
|
+
if (index !== selector.length - 1) {
|
|
327
|
+
// We only accept it in the last position
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// This was the only component, so we return the ref
|
|
332
|
+
if (selector.length === 1) {
|
|
333
|
+
return queries ?? [{ specificity: [] }];
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
const previous = selector[index - 1];
|
|
337
|
+
|
|
338
|
+
// If the previous component is not a descendant combinator,
|
|
339
|
+
if (
|
|
340
|
+
!previous ||
|
|
341
|
+
previous.type !== "combinator" ||
|
|
342
|
+
previous.value !== "descendant"
|
|
343
|
+
) {
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
return parseIsWhereComponents(type, selector, index + 1, queries);
|
|
348
|
+
}
|
|
349
|
+
case "pseudo-class": {
|
|
350
|
+
// const specificity = ref.specificity;
|
|
351
|
+
|
|
352
|
+
// specificity[Specificity.ClassName] =
|
|
353
|
+
// (specificity[Specificity.ClassName] ?? 0) + 1;
|
|
354
|
+
switch (component.kind) {
|
|
355
|
+
case "hover": {
|
|
356
|
+
queries ??= [{ specificity: [] }];
|
|
357
|
+
queries.forEach((query) => {
|
|
358
|
+
getPseudoClassesQuery(query).h = 1;
|
|
359
|
+
});
|
|
360
|
+
return parseIsWhereComponents(type, selector, index + 1, queries);
|
|
361
|
+
}
|
|
362
|
+
case "active": {
|
|
363
|
+
queries ??= [{ specificity: [] }];
|
|
364
|
+
queries.forEach((query) => {
|
|
365
|
+
getPseudoClassesQuery(query).a = 1;
|
|
366
|
+
});
|
|
367
|
+
return parseIsWhereComponents(type, selector, index + 1, queries);
|
|
368
|
+
}
|
|
369
|
+
case "focus": {
|
|
370
|
+
queries ??= [{ specificity: [] }];
|
|
371
|
+
queries.forEach((query) => {
|
|
372
|
+
getPseudoClassesQuery(query).f = 1;
|
|
373
|
+
});
|
|
374
|
+
return parseIsWhereComponents(type, selector, index + 1, queries);
|
|
375
|
+
}
|
|
376
|
+
case "disabled": {
|
|
377
|
+
queries ??= [{ specificity: [] }];
|
|
378
|
+
queries.forEach((query) => {
|
|
379
|
+
getAttributeQuery(query).push(["a", "disabled"]);
|
|
380
|
+
});
|
|
381
|
+
return parseIsWhereComponents(type, selector, index + 1, queries);
|
|
382
|
+
}
|
|
383
|
+
case "empty": {
|
|
384
|
+
queries ??= [{ specificity: [] }];
|
|
385
|
+
queries.forEach((query) => {
|
|
386
|
+
getAttributeQuery(query).push(["a", "children", "!"]);
|
|
387
|
+
});
|
|
388
|
+
return parseIsWhereComponents(type, selector, index + 1, queries);
|
|
389
|
+
}
|
|
390
|
+
case "where":
|
|
391
|
+
case "is": {
|
|
392
|
+
// :is() and :where() need to be at the start of the selector,
|
|
393
|
+
if (index !== 0) {
|
|
394
|
+
return null;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// Now get the selectors inside the `is` or `where` pseudo-class
|
|
398
|
+
queries = component.selectors.flatMap((selector) => {
|
|
399
|
+
return parseIsWhereComponents(type, selector, 0, queries) ?? [];
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
return parseIsWhereComponents(type, selector, index + 1, queries);
|
|
403
|
+
}
|
|
404
|
+
default: {
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
case "attribute": {
|
|
410
|
+
if (type !== "where") {
|
|
411
|
+
// specificity[Specificity.ClassName] =
|
|
412
|
+
// (specificity[Specificity.ClassName] ?? 0) + 1;
|
|
413
|
+
}
|
|
414
|
+
const attributeQuery: AttributeQuery = component.name.startsWith("data-")
|
|
415
|
+
? // [data-*] are turned into `dataSet` queries
|
|
416
|
+
["d", toRNProperty(component.name.replace("data-", ""))]
|
|
417
|
+
: // Everything else is turned into `attribute` queries
|
|
418
|
+
["a", toRNProperty(component.name)];
|
|
419
|
+
if (component.operation) {
|
|
420
|
+
let operator: AttrSelectorOperator | undefined;
|
|
421
|
+
switch (component.operation.operator) {
|
|
422
|
+
case "equal":
|
|
423
|
+
operator = "=";
|
|
424
|
+
break;
|
|
425
|
+
case "includes":
|
|
426
|
+
operator = "~=";
|
|
427
|
+
break;
|
|
428
|
+
case "dash-match":
|
|
429
|
+
operator = "|=";
|
|
430
|
+
break;
|
|
431
|
+
case "prefix":
|
|
432
|
+
operator = "^=";
|
|
433
|
+
break;
|
|
434
|
+
case "substring":
|
|
435
|
+
operator = "*=";
|
|
436
|
+
break;
|
|
437
|
+
case "suffix":
|
|
438
|
+
operator = "$=";
|
|
439
|
+
break;
|
|
440
|
+
default:
|
|
441
|
+
component.operation.operator satisfies never;
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
444
|
+
if (operator) {
|
|
445
|
+
// Append the operator onto the attribute query
|
|
446
|
+
attributeQuery.push(operator, component.operation.value);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
queries ??= [{ specificity: [] }];
|
|
450
|
+
for (const query of queries) {
|
|
451
|
+
if (type === "is") {
|
|
452
|
+
query.specificity[Specificity.ClassName] =
|
|
453
|
+
(query.specificity[Specificity.ClassName] ?? 0) + 1;
|
|
454
|
+
}
|
|
455
|
+
getAttributeQuery(query).push(attributeQuery);
|
|
456
|
+
}
|
|
457
|
+
return parseIsWhereComponents(type, selector, index + 1, queries);
|
|
458
|
+
}
|
|
459
|
+
case "class": {
|
|
460
|
+
// In `is` and `where` selectors, the ref will always be a container query
|
|
461
|
+
queries ??= [{ specificity: [] }];
|
|
462
|
+
for (const query of queries) {
|
|
463
|
+
if (type === "is") {
|
|
464
|
+
query.specificity[Specificity.ClassName] =
|
|
465
|
+
(query.specificity[Specificity.ClassName] ?? 0) + 1;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
query.n = query.n ? `${query.n}.${component.name}` : component.name;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
return parseIsWhereComponents(type, selector, index + 1, queries);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
function isContainerQuery(
|
|
477
|
+
value: PartialSelector | ContainerQuery,
|
|
478
|
+
): value is ContainerQuery {
|
|
479
|
+
return !("type" in value);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
function getPseudoClassesQuery(key: PartialSelector | ContainerQuery) {
|
|
483
|
+
let pseudoClassesQuery = pseudoClassesQueryMap.get(key);
|
|
484
|
+
if (!pseudoClassesQuery) {
|
|
485
|
+
if ("type" in key) {
|
|
486
|
+
pseudoClassesQuery = {};
|
|
487
|
+
key.pseudoClassesQuery = pseudoClassesQuery;
|
|
488
|
+
} else {
|
|
489
|
+
key.p ??= {};
|
|
490
|
+
pseudoClassesQuery = key.p;
|
|
491
|
+
}
|
|
492
|
+
pseudoClassesQueryMap.set(key, pseudoClassesQuery);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
return pseudoClassesQuery;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
function getAttributeQuery(
|
|
499
|
+
key: PartialSelector | ContainerQuery,
|
|
500
|
+
): AttributeQuery[] {
|
|
501
|
+
let attributeQuery = attributeQueryMap.get(key);
|
|
502
|
+
if (!attributeQuery) {
|
|
503
|
+
if ("type" in key) {
|
|
504
|
+
attributeQuery = [];
|
|
505
|
+
key.attributeQuery = attributeQuery;
|
|
506
|
+
} else {
|
|
507
|
+
key.a ??= [];
|
|
508
|
+
attributeQuery = key.a;
|
|
509
|
+
}
|
|
510
|
+
attributeQueryMap.set(key, attributeQuery);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
return attributeQuery;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
function isRootVariableSelector([first, second]: Selector) {
|
|
517
|
+
return (
|
|
518
|
+
first && !second && first.type === "pseudo-class" && first.kind === "root"
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export function toRNProperty<T extends string>(str: T) {
|
|
523
|
+
return str
|
|
524
|
+
.replace(/^-rn-/, "")
|
|
525
|
+
.replace(/-./g, (x) => x[1]?.toUpperCase() ?? "") as CamelCase<T>;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
type CamelCase<S extends string> =
|
|
529
|
+
S extends `${infer P1}-${infer P2}${infer P3}`
|
|
530
|
+
? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}`
|
|
531
|
+
: Lowercase<S>;
|