react-native-css 2.1.1 → 3.0.0-nightly.27bd5e2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE.md → LICENSE} +6 -8
- package/README.md +177 -70
- package/dist/commonjs/babel/allowedModules.js +23 -0
- package/dist/commonjs/babel/allowedModules.js.map +1 -0
- package/dist/commonjs/babel/helpers.js +25 -0
- package/dist/commonjs/babel/helpers.js.map +1 -0
- package/dist/commonjs/babel/import-plugin.js +101 -0
- package/dist/commonjs/babel/import-plugin.js.map +1 -0
- package/dist/commonjs/babel/index.js +9 -0
- package/dist/commonjs/babel/index.js.map +1 -0
- package/dist/commonjs/babel/react-native-web.js +118 -0
- package/dist/commonjs/babel/react-native-web.js.map +1 -0
- package/dist/commonjs/babel/react-native.js +118 -0
- package/dist/commonjs/babel/react-native.js.map +1 -0
- package/dist/commonjs/compiler/atRules.js +101 -0
- package/dist/commonjs/compiler/atRules.js.map +1 -0
- package/dist/commonjs/compiler/attributes.test.js +20 -0
- package/dist/commonjs/compiler/attributes.test.js.map +1 -0
- package/dist/commonjs/compiler/compiler.js +235 -0
- package/dist/commonjs/compiler/compiler.js.map +1 -0
- package/dist/commonjs/compiler/compiler.types.js +4 -0
- package/dist/commonjs/compiler/compiler.types.js.map +1 -0
- package/dist/commonjs/compiler/container-query.js +63 -0
- package/dist/commonjs/compiler/container-query.js.map +1 -0
- package/dist/commonjs/compiler/declarations.js +2088 -0
- package/dist/commonjs/compiler/declarations.js.map +1 -0
- package/dist/commonjs/compiler/functions-web.js +44 -0
- package/dist/commonjs/compiler/functions-web.js.map +1 -0
- package/dist/commonjs/compiler/functions.js +59 -0
- package/dist/commonjs/compiler/functions.js.map +1 -0
- package/dist/commonjs/compiler/index.js +17 -0
- package/dist/commonjs/compiler/index.js.map +1 -0
- package/dist/commonjs/compiler/inheritance.test.js +78 -0
- package/dist/commonjs/compiler/inheritance.test.js.map +1 -0
- package/dist/commonjs/compiler/keyframes.js +60 -0
- package/dist/commonjs/compiler/keyframes.js.map +1 -0
- package/dist/commonjs/compiler/media-query.js +172 -0
- package/dist/commonjs/compiler/media-query.js.map +1 -0
- package/dist/commonjs/compiler/selectors.js +410 -0
- package/dist/commonjs/compiler/selectors.js.map +1 -0
- package/dist/commonjs/compiler/split-by-delimiter.js +21 -0
- package/dist/commonjs/compiler/split-by-delimiter.js.map +1 -0
- package/dist/commonjs/compiler/stylesheet.js +374 -0
- package/dist/commonjs/compiler/stylesheet.js.map +1 -0
- package/dist/commonjs/components/Text.js +17 -0
- package/dist/commonjs/components/Text.js.map +1 -0
- package/dist/commonjs/components/View.js +17 -0
- package/dist/commonjs/components/View.js.map +1 -0
- package/dist/commonjs/components/index.js +36 -0
- package/dist/commonjs/components/index.js.map +1 -0
- package/dist/commonjs/doctor/index.js +6 -0
- package/dist/commonjs/doctor/index.js.map +1 -0
- package/dist/commonjs/index.js +28 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/jest/expect.d.js +2 -0
- package/dist/commonjs/jest/expect.d.js.map +1 -0
- package/dist/commonjs/jest/index.js +50 -0
- package/dist/commonjs/jest/index.js.map +1 -0
- package/dist/commonjs/jest/setup.js +3 -0
- package/dist/commonjs/jest/setup.js.map +1 -0
- package/dist/commonjs/jest/setupAfterEnv.js +15 -0
- package/dist/commonjs/jest/setupAfterEnv.js.map +1 -0
- package/dist/commonjs/metro/index.js +165 -0
- package/dist/commonjs/metro/index.js.map +1 -0
- package/dist/commonjs/metro/injection-code.js +32 -0
- package/dist/commonjs/metro/injection-code.js.map +1 -0
- package/dist/commonjs/metro/metro-transformer.js +21 -0
- package/dist/commonjs/metro/metro-transformer.js.map +1 -0
- package/dist/commonjs/metro/picocolors.js +71 -0
- package/dist/commonjs/metro/picocolors.js.map +1 -0
- package/dist/commonjs/metro/resolver.js +62 -0
- package/dist/commonjs/metro/resolver.js.map +1 -0
- package/dist/commonjs/metro/stringify.js +59 -0
- package/dist/commonjs/metro/stringify.js.map +1 -0
- package/dist/commonjs/metro/typescript.js +47 -0
- package/dist/commonjs/metro/typescript.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/poison.pill.js +36 -0
- package/dist/commonjs/poison.pill.js.map +1 -0
- package/dist/commonjs/runtime/index.js +17 -0
- package/dist/commonjs/runtime/index.js.map +1 -0
- package/dist/commonjs/runtime/native/api.js +90 -0
- package/dist/commonjs/runtime/native/api.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js +116 -0
- package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/guards.js +33 -0
- package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/index.js +74 -0
- package/dist/commonjs/runtime/native/conditions/index.js.map +1 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js +93 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/commonjs/runtime/native/index.js +28 -0
- package/dist/commonjs/runtime/native/index.js.map +1 -0
- package/dist/commonjs/runtime/native/injection.js +98 -0
- package/dist/commonjs/runtime/native/injection.js.map +1 -0
- package/dist/commonjs/runtime/native/metro.js +6 -0
- package/dist/commonjs/runtime/native/metro.js.map +1 -0
- package/dist/commonjs/runtime/native/react/interaction.js +63 -0
- package/dist/commonjs/runtime/native/react/interaction.js.map +1 -0
- package/dist/commonjs/runtime/native/react/rules.js +253 -0
- package/dist/commonjs/runtime/native/react/rules.js.map +1 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js +158 -0
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js +50 -0
- package/dist/commonjs/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/commonjs/runtime/native/reactivity.js +189 -0
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/animation.js +88 -0
- package/dist/commonjs/runtime/native/styles/animation.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/border.js +12 -0
- package/dist/commonjs/runtime/native/styles/border.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js +40 -0
- package/dist/commonjs/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calc.js +85 -0
- package/dist/commonjs/runtime/native/styles/calc.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js +123 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/constants.js +9 -0
- package/dist/commonjs/runtime/native/styles/constants.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/defaults.js +69 -0
- package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/filters.js +84 -0
- package/dist/commonjs/runtime/native/styles/filters.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/index.js +115 -0
- package/dist/commonjs/runtime/native/styles/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/platform-functions.js +46 -0
- package/dist/commonjs/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/resolve.js +129 -0
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthand.js +79 -0
- package/dist/commonjs/runtime/native/styles/shorthand.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/text-shadow.js +13 -0
- package/dist/commonjs/runtime/native/styles/text-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/transform.js +23 -0
- package/dist/commonjs/runtime/native/styles/transform.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/units.js +49 -0
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/variables.js +78 -0
- package/dist/commonjs/runtime/native/styles/variables.js.map +1 -0
- package/dist/commonjs/runtime/runtime.js +17 -0
- package/dist/commonjs/runtime/runtime.js.map +1 -0
- package/dist/commonjs/runtime/runtime.native.js +17 -0
- package/dist/commonjs/runtime/runtime.native.js.map +1 -0
- package/dist/commonjs/runtime/runtime.types.js +6 -0
- package/dist/commonjs/runtime/runtime.types.js.map +1 -0
- package/dist/commonjs/runtime/utils/components.js +18 -0
- package/dist/commonjs/runtime/utils/components.js.map +1 -0
- package/dist/commonjs/runtime/utils/dot-notation.types.js +2 -0
- package/dist/commonjs/runtime/utils/dot-notation.types.js.map +1 -0
- package/dist/commonjs/runtime/utils/index.js +61 -0
- package/dist/commonjs/runtime/utils/index.js.map +1 -0
- package/dist/commonjs/runtime/utils/objects.js +84 -0
- package/dist/commonjs/runtime/utils/objects.js.map +1 -0
- package/dist/commonjs/runtime/utils/specificity.js +43 -0
- package/dist/commonjs/runtime/utils/specificity.js.map +1 -0
- package/dist/commonjs/runtime/utils/style-value.js +21 -0
- package/dist/commonjs/runtime/utils/style-value.js.map +1 -0
- package/dist/commonjs/runtime/utils/utils.types.js +6 -0
- package/dist/commonjs/runtime/utils/utils.types.js.map +1 -0
- package/dist/commonjs/runtime/web/api.js +68 -0
- package/dist/commonjs/runtime/web/api.js.map +1 -0
- package/dist/commonjs/runtime/web/assign-style.js +27 -0
- package/dist/commonjs/runtime/web/assign-style.js.map +1 -0
- package/dist/commonjs/runtime/web/index.js +18 -0
- package/dist/commonjs/runtime/web/index.js.map +1 -0
- package/dist/commonjs/runtime/web/metro.js +6 -0
- package/dist/commonjs/runtime/web/metro.js.map +1 -0
- package/dist/module/babel/allowedModules.js +19 -0
- package/dist/module/babel/allowedModules.js.map +1 -0
- package/dist/module/babel/helpers.js +21 -0
- package/dist/module/babel/helpers.js.map +1 -0
- package/dist/module/babel/import-plugin.js +97 -0
- package/dist/module/babel/import-plugin.js.map +1 -0
- package/dist/module/babel/index.js +9 -0
- package/dist/module/babel/index.js.map +1 -0
- package/dist/module/babel/react-native-web.js +112 -0
- package/dist/module/babel/react-native-web.js.map +1 -0
- package/dist/module/babel/react-native.js +112 -0
- package/dist/module/babel/react-native.js.map +1 -0
- package/dist/module/compiler/atRules.js +97 -0
- package/dist/module/compiler/atRules.js.map +1 -0
- package/dist/module/compiler/attributes.test.js +20 -0
- package/dist/module/compiler/attributes.test.js.map +1 -0
- package/dist/module/compiler/compiler.js +230 -0
- package/dist/module/compiler/compiler.js.map +1 -0
- package/dist/module/compiler/compiler.types.js +60 -0
- package/dist/module/compiler/compiler.types.js.map +1 -0
- package/dist/module/compiler/container-query.js +59 -0
- package/dist/module/compiler/container-query.js.map +1 -0
- package/dist/module/compiler/declarations.js +2014 -0
- package/dist/module/compiler/declarations.js.map +1 -0
- package/dist/module/compiler/functions-web.js +32 -0
- package/dist/module/compiler/functions-web.js.map +1 -0
- package/dist/module/compiler/functions.js +47 -0
- package/dist/module/compiler/functions.js.map +1 -0
- package/dist/module/compiler/index.js +9 -0
- package/dist/module/compiler/index.js.map +1 -0
- package/dist/module/compiler/inheritance.test.js +78 -0
- package/dist/module/compiler/inheritance.test.js.map +1 -0
- package/dist/module/compiler/keyframes.js +54 -0
- package/dist/module/compiler/keyframes.js.map +1 -0
- package/dist/module/compiler/media-query.js +166 -0
- package/dist/module/compiler/media-query.js.map +1 -0
- package/dist/module/compiler/selectors.js +405 -0
- package/dist/module/compiler/selectors.js.map +1 -0
- package/dist/module/compiler/split-by-delimiter.js +17 -0
- package/dist/module/compiler/split-by-delimiter.js.map +1 -0
- package/dist/module/compiler/stylesheet.js +369 -0
- package/dist/module/compiler/stylesheet.js.map +1 -0
- package/dist/module/components/Text.js +12 -0
- package/dist/module/components/Text.js.map +1 -0
- package/dist/module/components/View.js +12 -0
- package/dist/module/components/View.js.map +1 -0
- package/dist/module/components/index.js +6 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/doctor/index.js +4 -0
- package/dist/module/doctor/index.js.map +1 -0
- package/dist/module/index.js +5 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/jest/expect.d.js +2 -0
- package/dist/module/jest/expect.d.js.map +1 -0
- package/dist/module/jest/index.js +29 -0
- package/dist/module/jest/index.js.map +1 -0
- package/dist/module/jest/setup.js +3 -0
- package/dist/module/jest/setup.js.map +1 -0
- package/dist/module/jest/setupAfterEnv.js +15 -0
- package/dist/module/jest/setupAfterEnv.js.map +1 -0
- package/dist/module/metro/index.js +159 -0
- package/dist/module/metro/index.js.map +1 -0
- package/dist/module/metro/injection-code.js +27 -0
- package/dist/module/metro/injection-code.js.map +1 -0
- package/dist/module/metro/metro-transformer.js +17 -0
- package/dist/module/metro/metro-transformer.js.map +1 -0
- package/dist/module/metro/picocolors.js +67 -0
- package/dist/module/metro/picocolors.js.map +1 -0
- package/dist/module/metro/resolver.js +57 -0
- package/dist/module/metro/resolver.js.map +1 -0
- package/dist/module/metro/stringify.js +55 -0
- package/dist/module/metro/stringify.js.map +1 -0
- package/dist/module/metro/typescript.js +42 -0
- package/dist/module/metro/typescript.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/poison.pill.js +34 -0
- package/dist/module/poison.pill.js.map +1 -0
- package/dist/module/runtime/index.js +9 -0
- package/dist/module/runtime/index.js.map +1 -0
- package/dist/module/runtime/native/api.js +75 -0
- package/dist/module/runtime/native/api.js.map +1 -0
- package/dist/module/runtime/native/conditions/container-query.js +110 -0
- package/dist/module/runtime/native/conditions/container-query.js.map +1 -0
- package/dist/module/runtime/native/conditions/guards.js +29 -0
- package/dist/module/runtime/native/conditions/guards.js.map +1 -0
- package/dist/module/runtime/native/conditions/index.js +70 -0
- package/dist/module/runtime/native/conditions/index.js.map +1 -0
- package/dist/module/runtime/native/conditions/media-query.js +88 -0
- package/dist/module/runtime/native/conditions/media-query.js.map +1 -0
- package/dist/module/runtime/native/index.js +5 -0
- package/dist/module/runtime/native/index.js.map +1 -0
- package/dist/module/runtime/native/injection.js +93 -0
- package/dist/module/runtime/native/injection.js.map +1 -0
- package/dist/module/runtime/native/metro.js +5 -0
- package/dist/module/runtime/native/metro.js.map +1 -0
- package/dist/module/runtime/native/react/interaction.js +59 -0
- package/dist/module/runtime/native/react/interaction.js.map +1 -0
- package/dist/module/runtime/native/react/rules.js +246 -0
- package/dist/module/runtime/native/react/rules.js.map +1 -0
- package/dist/module/runtime/native/react/useNativeCss.js +152 -0
- package/dist/module/runtime/native/react/useNativeCss.js.map +1 -0
- package/dist/module/runtime/native/react/usePassthrough.js +45 -0
- package/dist/module/runtime/native/react/usePassthrough.js.map +1 -0
- package/dist/module/runtime/native/reactivity.js +177 -0
- package/dist/module/runtime/native/reactivity.js.map +1 -0
- package/dist/module/runtime/native/styles/animation.js +82 -0
- package/dist/module/runtime/native/styles/animation.js.map +1 -0
- package/dist/module/runtime/native/styles/border.js +8 -0
- package/dist/module/runtime/native/styles/border.js.map +1 -0
- package/dist/module/runtime/native/styles/box-shadow.js +35 -0
- package/dist/module/runtime/native/styles/box-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/calc.js +79 -0
- package/dist/module/runtime/native/styles/calc.js.map +1 -0
- package/dist/module/runtime/native/styles/calculate-props.js +118 -0
- package/dist/module/runtime/native/styles/calculate-props.js.map +1 -0
- package/dist/module/runtime/native/styles/constants.js +5 -0
- package/dist/module/runtime/native/styles/constants.js.map +1 -0
- package/dist/module/runtime/native/styles/defaults.js +65 -0
- package/dist/module/runtime/native/styles/defaults.js.map +1 -0
- package/dist/module/runtime/native/styles/filters.js +70 -0
- package/dist/module/runtime/native/styles/filters.js.map +1 -0
- package/dist/module/runtime/native/styles/index.js +110 -0
- package/dist/module/runtime/native/styles/index.js.map +1 -0
- package/dist/module/runtime/native/styles/platform-functions.js +36 -0
- package/dist/module/runtime/native/styles/platform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/resolve.js +125 -0
- package/dist/module/runtime/native/styles/resolve.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthand.js +74 -0
- package/dist/module/runtime/native/styles/shorthand.js.map +1 -0
- package/dist/module/runtime/native/styles/text-shadow.js +9 -0
- package/dist/module/runtime/native/styles/text-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/transform.js +18 -0
- package/dist/module/runtime/native/styles/transform.js.map +1 -0
- package/dist/module/runtime/native/styles/units.js +40 -0
- package/dist/module/runtime/native/styles/units.js.map +1 -0
- package/dist/module/runtime/native/styles/variables.js +74 -0
- package/dist/module/runtime/native/styles/variables.js.map +1 -0
- package/dist/module/runtime/runtime.js +4 -0
- package/dist/module/runtime/runtime.js.map +1 -0
- package/dist/module/runtime/runtime.native.js +4 -0
- package/dist/module/runtime/runtime.native.js.map +1 -0
- package/dist/module/runtime/runtime.types.js +4 -0
- package/dist/module/runtime/runtime.types.js.map +1 -0
- package/dist/module/runtime/utils/components.js +14 -0
- package/dist/module/runtime/utils/components.js.map +1 -0
- package/dist/module/runtime/utils/dot-notation.types.js +2 -0
- package/dist/module/runtime/utils/dot-notation.types.js.map +1 -0
- package/dist/module/runtime/utils/index.js +8 -0
- package/dist/module/runtime/utils/index.js.map +1 -0
- package/dist/module/runtime/utils/objects.js +76 -0
- package/dist/module/runtime/utils/objects.js.map +1 -0
- package/dist/module/runtime/utils/specificity.js +38 -0
- package/dist/module/runtime/utils/specificity.js.map +1 -0
- package/dist/module/runtime/utils/style-value.js +16 -0
- package/dist/module/runtime/utils/style-value.js.map +1 -0
- package/dist/module/runtime/utils/utils.types.js +4 -0
- package/dist/module/runtime/utils/utils.types.js.map +1 -0
- package/dist/module/runtime/web/api.js +59 -0
- package/dist/module/runtime/web/api.js.map +1 -0
- package/dist/module/runtime/web/assign-style.js +23 -0
- package/dist/module/runtime/web/assign-style.js.map +1 -0
- package/dist/module/runtime/web/index.js +6 -0
- package/dist/module/runtime/web/index.js.map +1 -0
- package/dist/module/runtime/web/metro.js +5 -0
- package/dist/module/runtime/web/metro.js.map +1 -0
- package/dist/typescript/commonjs/example/src/App.d.ts +3 -0
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/commonjs/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/commonjs/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/commonjs/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts +1 -0
- package/dist/typescript/commonjs/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/commonjs/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +10 -0
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +198 -0
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/commonjs/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +121 -0
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/commonjs/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts +23 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts +2 -0
- package/dist/typescript/commonjs/src/compiler/split-by-delimiter.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +50 -0
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/View.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/View.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/doctor/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/doctor/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/index.d.ts +3 -0
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts +14 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/commonjs/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts +11 -0
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts +16 -0
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/commonjs/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/commonjs/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/commonjs/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts +2 -0
- package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +37 -0
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +63 -0
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +9 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts +12 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts +11 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts +7 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/runtime.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/runtime.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts +47 -0
- package/dist/typescript/commonjs/src/runtime/runtime.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/utils/components.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts +23 -0
- package/dist/typescript/commonjs/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/utils/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +12 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/web/metro.d.ts.map +1 -0
- package/dist/typescript/module/example/src/App.d.ts +3 -0
- package/dist/typescript/module/example/src/App.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts +2 -0
- package/dist/typescript/module/src/babel/allowedModules.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/helpers.d.ts +13 -0
- package/dist/typescript/module/src/babel/helpers.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts +6 -0
- package/dist/typescript/module/src/babel/import-plugin.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/index.d.ts +1 -0
- package/dist/typescript/module/src/babel/index.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native-web.d.ts.map +1 -0
- package/dist/typescript/module/src/babel/react-native.d.ts +8 -0
- package/dist/typescript/module/src/babel/react-native.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts +34 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/attributes.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts +10 -0
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +198 -0
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts +5 -0
- package/dist/typescript/module/src/compiler/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts +121 -0
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions-web.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/functions.d.ts +11 -0
- package/dist/typescript/module/src/compiler/functions.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/index.d.ts +7 -0
- package/dist/typescript/module/src/compiler/index.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts +2 -0
- package/dist/typescript/module/src/compiler/inheritance.test.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts +7 -0
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts +7 -0
- package/dist/typescript/module/src/compiler/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts +23 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts +2 -0
- package/dist/typescript/module/src/compiler/split-by-delimiter.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +50 -0
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Text.d.ts +8 -0
- package/dist/typescript/module/src/components/Text.d.ts.map +1 -0
- package/dist/typescript/module/src/components/View.d.ts +8 -0
- package/dist/typescript/module/src/components/View.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +4 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -0
- package/dist/typescript/module/src/doctor/index.d.ts +2 -0
- package/dist/typescript/module/src/doctor/index.d.ts.map +1 -0
- package/dist/typescript/module/src/index.d.ts +3 -0
- package/dist/typescript/module/src/index.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/index.d.ts +14 -0
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts +1 -0
- package/dist/typescript/module/src/jest/setup.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts +1 -0
- package/dist/typescript/module/src/jest/setupAfterEnv.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/index.d.ts +11 -0
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts +16 -0
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +3 -0
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts +27 -0
- package/dist/typescript/module/src/metro/picocolors.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/resolver.d.ts +4 -0
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/stringify.d.ts +7 -0
- package/dist/typescript/module/src/metro/stringify.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/typescript.d.ts +2 -0
- package/dist/typescript/module/src/metro/typescript.d.ts.map +1 -0
- package/dist/typescript/module/src/poison.pill.d.ts +2 -0
- package/dist/typescript/module/src/poison.pill.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/index.d.ts +7 -0
- package/dist/typescript/module/src/runtime/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts +17 -0
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts +16 -0
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/metro.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +37 -0
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/react/usePassthrough.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +63 -0
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +9 -0
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +10 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/constants.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts +12 -0
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts +19 -0
- package/dist/typescript/module/src/runtime/native/styles/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts +8 -0
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts +18 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts +11 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts +7 -0
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.d.ts +2 -0
- package/dist/typescript/module/src/runtime/runtime.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.native.d.ts +2 -0
- package/dist/typescript/module/src/runtime/runtime.native.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/runtime.types.d.ts +47 -0
- package/dist/typescript/module/src/runtime/runtime.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/components.d.ts +2 -0
- package/dist/typescript/module/src/runtime/utils/components.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts +23 -0
- package/dist/typescript/module/src/runtime/utils/dot-notation.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/utils/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/objects.d.ts +5 -0
- package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts +12 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts +4 -0
- package/dist/typescript/module/src/runtime/utils/style-value.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts +5 -0
- package/dist/typescript/module/src/runtime/utils/utils.types.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts +10 -0
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/assign-style.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts +4 -0
- package/dist/typescript/module/src/runtime/web/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts +2 -0
- package/dist/typescript/module/src/runtime/web/metro.d.ts.map +1 -0
- package/package.json +222 -45
- package/src/babel/allowedModules.ts +24 -0
- package/src/babel/helpers.ts +40 -0
- package/src/babel/import-plugin.ts +176 -0
- package/src/babel/index.ts +9 -0
- package/src/babel/react-native-web.ts +226 -0
- package/src/babel/react-native.ts +226 -0
- package/src/compiler/atRules.ts +144 -0
- package/src/compiler/attributes.test.ts +28 -0
- package/src/compiler/compiler.ts +268 -0
- package/src/compiler/compiler.types.ts +267 -0
- package/src/compiler/container-query.ts +97 -0
- package/src/compiler/declarations.ts +2964 -0
- package/src/compiler/functions-web.ts +44 -0
- package/src/compiler/functions.ts +64 -0
- package/src/compiler/index.ts +7 -0
- package/src/compiler/inheritance.test.ts +121 -0
- package/src/compiler/keyframes.ts +86 -0
- package/src/compiler/media-query.ts +251 -0
- package/src/compiler/selectors.ts +491 -0
- package/src/compiler/split-by-delimiter.ts +19 -0
- package/src/compiler/stylesheet.ts +528 -0
- package/src/components/Text.tsx +17 -0
- package/src/components/View.tsx +17 -0
- package/src/components/index.tsx +4 -0
- package/src/doctor/index.ts +1 -0
- package/src/index.ts +3 -0
- package/src/jest/expect.d.ts +1 -0
- package/src/jest/index.ts +42 -0
- package/src/jest/setup.ts +1 -0
- package/src/jest/setupAfterEnv.ts +13 -0
- package/src/metro/index.ts +231 -0
- package/src/metro/injection-code.ts +38 -0
- package/src/metro/metro-transformer.ts +31 -0
- package/src/metro/picocolors.ts +77 -0
- package/src/metro/resolver.ts +89 -0
- package/src/metro/stringify.ts +59 -0
- package/src/metro/typescript.ts +73 -0
- package/src/poison.pill.ts +32 -0
- package/src/runtime/index.ts +7 -0
- package/src/runtime/native/api.ts +106 -0
- package/src/runtime/native/conditions/container-query.ts +157 -0
- package/src/runtime/native/conditions/guards.ts +45 -0
- package/src/runtime/native/conditions/index.ts +106 -0
- package/src/runtime/native/conditions/media-query.ts +94 -0
- package/src/runtime/native/index.ts +4 -0
- package/src/runtime/native/injection.ts +131 -0
- package/src/runtime/native/metro.ts +2 -0
- package/src/runtime/native/react/interaction.ts +90 -0
- package/src/runtime/native/react/rules.ts +326 -0
- package/src/runtime/native/react/useNativeCss.ts +200 -0
- package/src/runtime/native/react/usePassthrough.ts +51 -0
- package/src/runtime/native/reactivity.ts +262 -0
- package/src/runtime/native/styles/animation.ts +181 -0
- package/src/runtime/native/styles/border.ts +10 -0
- package/src/runtime/native/styles/box-shadow.ts +54 -0
- package/src/runtime/native/styles/calc.ts +97 -0
- package/src/runtime/native/styles/calculate-props.ts +165 -0
- package/src/runtime/native/styles/constants.ts +2 -0
- package/src/runtime/native/styles/defaults.ts +78 -0
- package/src/runtime/native/styles/filters.ts +98 -0
- package/src/runtime/native/styles/index.ts +197 -0
- package/src/runtime/native/styles/platform-functions.ts +50 -0
- package/src/runtime/native/styles/resolve.ts +205 -0
- package/src/runtime/native/styles/shorthand.ts +121 -0
- package/src/runtime/native/styles/text-shadow.ts +17 -0
- package/src/runtime/native/styles/transform.ts +21 -0
- package/src/runtime/native/styles/units.ts +53 -0
- package/src/runtime/native/styles/variables.ts +88 -0
- package/src/runtime/runtime.native.ts +1 -0
- package/src/runtime/runtime.ts +1 -0
- package/src/runtime/runtime.types.ts +130 -0
- package/src/runtime/utils/components.ts +15 -0
- package/src/runtime/utils/dot-notation.types.ts +118 -0
- package/src/runtime/utils/index.ts +5 -0
- package/src/runtime/utils/objects.ts +97 -0
- package/src/runtime/utils/specificity.ts +44 -0
- package/src/runtime/utils/style-value.ts +24 -0
- package/src/runtime/utils/utils.types.ts +19 -0
- package/src/runtime/web/api.ts +88 -0
- package/src/runtime/web/assign-style.ts +26 -0
- package/src/runtime/web/index.ts +5 -0
- package/src/runtime/web/metro.ts +2 -0
- package/.babelrc +0 -8
- package/.editorconfig +0 -17
- package/.eslintignore +0 -3
- package/.eslintrc +0 -39
- package/.npmignore +0 -7
- package/build/index.js +0 -294
- package/build/utils.js +0 -54
- package/circle.yml +0 -31
- package/jsconfig.json +0 -9
- package/login.sh +0 -11
- package/src/index.js +0 -184
- package/src/utils.js +0 -32
- package/test/rnc.test.js +0 -258
- package/yarn.lock +0 -3333
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { debug } from "debug";
|
|
3
|
+
import {
|
|
4
|
+
transform as lightningcss,
|
|
5
|
+
type ContainerRule,
|
|
6
|
+
type MediaQuery as CSSMediaQuery,
|
|
7
|
+
type CustomAtRules,
|
|
8
|
+
type MediaRule,
|
|
9
|
+
type Rule,
|
|
10
|
+
type TokenOrValue,
|
|
11
|
+
type Visitor,
|
|
12
|
+
} from "lightningcss";
|
|
13
|
+
|
|
14
|
+
import { maybeMutateReactNativeOptions, parsePropAtRule } from "./atRules";
|
|
15
|
+
import type {
|
|
16
|
+
CompilerOptions,
|
|
17
|
+
ContainerQuery,
|
|
18
|
+
ReactNativeCssStyleSheet,
|
|
19
|
+
} from "./compiler.types";
|
|
20
|
+
import { parseContainerCondition } from "./container-query";
|
|
21
|
+
import { parseDeclaration } from "./declarations";
|
|
22
|
+
import { extractKeyFrames } from "./keyframes";
|
|
23
|
+
import { parseMediaQuery } from "./media-query";
|
|
24
|
+
import { getSelectors } from "./selectors";
|
|
25
|
+
import { StylesheetBuilder } from "./stylesheet";
|
|
26
|
+
|
|
27
|
+
const defaultLogger = debug("react-native-css:compiler");
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Converts a CSS file to a collection of style declarations that can be used with the StyleSheet API
|
|
31
|
+
*
|
|
32
|
+
* @param code - The CSS file contents
|
|
33
|
+
* @param options - Compiler options
|
|
34
|
+
* @returns A `ReactNativeCssStyleSheet` that can be passed to `StyleSheet.register` or used with a custom runtime
|
|
35
|
+
*/
|
|
36
|
+
export function compile(
|
|
37
|
+
code: Buffer | string,
|
|
38
|
+
options: CompilerOptions = {},
|
|
39
|
+
): ReactNativeCssStyleSheet {
|
|
40
|
+
const { logger = defaultLogger } = options;
|
|
41
|
+
const features = Object.assign({}, options.features);
|
|
42
|
+
|
|
43
|
+
if (options.selectorPrefix && options.selectorPrefix.startsWith(".")) {
|
|
44
|
+
options.selectorPrefix = options.selectorPrefix.slice(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
logger(`Features ${JSON.stringify(features)}`);
|
|
48
|
+
|
|
49
|
+
if (process.env.NODE_ENV !== "production") {
|
|
50
|
+
if (defaultLogger.enabled) {
|
|
51
|
+
defaultLogger(code.toString());
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const builder = new StylesheetBuilder(options);
|
|
56
|
+
|
|
57
|
+
logger(`Start lightningcss`);
|
|
58
|
+
|
|
59
|
+
const customAtRules: CustomAtRules = {
|
|
60
|
+
"react-native": {
|
|
61
|
+
body: "declaration-list",
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const visitor: Visitor<typeof customAtRules> = {
|
|
66
|
+
Rule(rule) {
|
|
67
|
+
maybeMutateReactNativeOptions(rule, builder);
|
|
68
|
+
},
|
|
69
|
+
StyleSheetExit(sheet) {
|
|
70
|
+
logger(`Found ${sheet.rules.length} rules to process`);
|
|
71
|
+
logger(JSON.stringify(sheet.rules, null, 2));
|
|
72
|
+
|
|
73
|
+
for (const rule of sheet.rules) {
|
|
74
|
+
// Extract the style declarations and animations from the current rule
|
|
75
|
+
extractRule(rule, builder);
|
|
76
|
+
// We have processed this rule, so now delete it from the AST
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
logger(`Exiting lightningcss`);
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
if (options.stripUnusedVariables) {
|
|
84
|
+
const onVarUsage = (token: TokenOrValue) => {
|
|
85
|
+
if (token.type === "function") {
|
|
86
|
+
token.value.arguments.forEach((token) => onVarUsage(token));
|
|
87
|
+
} else if (token.type === "var") {
|
|
88
|
+
builder.varUsage.add(token.value.name.ident);
|
|
89
|
+
if (token.value.fallback) {
|
|
90
|
+
const fallbackValues = token.value.fallback;
|
|
91
|
+
fallbackValues.forEach((varObj) => onVarUsage(varObj));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
visitor.Declaration = (decl) => {
|
|
97
|
+
if (decl.property === "unparsed" || decl.property === "custom") {
|
|
98
|
+
decl.value.value.forEach((token) => onVarUsage(token));
|
|
99
|
+
}
|
|
100
|
+
return decl;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Use the lightningcss library to traverse the CSS AST and extract style declarations and animations
|
|
105
|
+
lightningcss({
|
|
106
|
+
filename: "style.css", // This is ignored, but required
|
|
107
|
+
code: typeof code === "string" ? new TextEncoder().encode(code) : code,
|
|
108
|
+
visitor,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
return builder.getNativeStyleSheet();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Extracts style declarations and animations from a given CSS rule, based on its type.
|
|
116
|
+
*/
|
|
117
|
+
function extractRule(rule: Rule, builder: StylesheetBuilder) {
|
|
118
|
+
// Check the rule's type to determine which extraction function to call
|
|
119
|
+
switch (rule.type) {
|
|
120
|
+
case "keyframes": {
|
|
121
|
+
// If the rule is a keyframe animation, extract it with the `extractKeyFrames` function
|
|
122
|
+
extractKeyFrames(rule.value, builder);
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
case "container": {
|
|
126
|
+
// If the rule is a container, extract it with the `extractedContainer` function
|
|
127
|
+
extractContainer(rule.value, builder);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
case "media": {
|
|
131
|
+
// If the rule is a media query, extract it with the `extractMedia` function
|
|
132
|
+
extractMedia(rule.value, builder);
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
case "style": {
|
|
136
|
+
// If the rule is a style declaration, extract it with the `getExtractedStyle` function and store it in the `declarations` map
|
|
137
|
+
builder = builder.fork("style");
|
|
138
|
+
|
|
139
|
+
const declarationBlock = rule.value.declarations;
|
|
140
|
+
const mapping = parsePropAtRule(rule.value.rules);
|
|
141
|
+
const selectors = getSelectors(
|
|
142
|
+
rule.value.selectors,
|
|
143
|
+
false,
|
|
144
|
+
builder.getOptions(),
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
if (declarationBlock) {
|
|
148
|
+
if (declarationBlock.declarations) {
|
|
149
|
+
builder.newRule(mapping);
|
|
150
|
+
for (const declaration of declarationBlock.declarations) {
|
|
151
|
+
parseDeclaration(declaration, builder);
|
|
152
|
+
}
|
|
153
|
+
builder.applyRuleToSelectors(selectors);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (declarationBlock.importantDeclarations) {
|
|
157
|
+
builder.newRule(mapping, { important: true });
|
|
158
|
+
for (const declaration of declarationBlock.importantDeclarations) {
|
|
159
|
+
parseDeclaration(declaration, builder);
|
|
160
|
+
}
|
|
161
|
+
builder.applyRuleToSelectors(selectors);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
case "layer-block":
|
|
167
|
+
for (const layerRule of rule.value.rules) {
|
|
168
|
+
extractRule(layerRule, builder);
|
|
169
|
+
}
|
|
170
|
+
break;
|
|
171
|
+
case "custom":
|
|
172
|
+
case "font-face":
|
|
173
|
+
case "font-palette-values":
|
|
174
|
+
case "font-feature-values":
|
|
175
|
+
case "namespace":
|
|
176
|
+
case "layer-statement":
|
|
177
|
+
case "property":
|
|
178
|
+
case "view-transition":
|
|
179
|
+
case "ignored":
|
|
180
|
+
case "unknown":
|
|
181
|
+
case "import":
|
|
182
|
+
case "page":
|
|
183
|
+
case "supports":
|
|
184
|
+
case "counter-style":
|
|
185
|
+
case "moz-document":
|
|
186
|
+
case "nesting":
|
|
187
|
+
case "nested-declarations":
|
|
188
|
+
case "viewport":
|
|
189
|
+
case "custom-media":
|
|
190
|
+
case "scope":
|
|
191
|
+
case "starting-style":
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* This function takes in a MediaRule object, an CompilerCollection object and a CssToReactNativeRuntimeOptions object,
|
|
198
|
+
* and returns an array of MediaQuery objects representing styles extracted from screen media queries.
|
|
199
|
+
*
|
|
200
|
+
* @param mediaRule - The MediaRule object containing the media query and its rules.
|
|
201
|
+
* @param collection - The CompilerCollection object to use when extracting styles.
|
|
202
|
+
* @param parseOptions - The CssToReactNativeRuntimeOptions object to use when parsing styles.
|
|
203
|
+
*
|
|
204
|
+
* @returns undefined if no screen media queries are found in the mediaRule, else it returns the extracted styles.
|
|
205
|
+
*/
|
|
206
|
+
function extractMedia(mediaRule: MediaRule, builder: StylesheetBuilder) {
|
|
207
|
+
builder = builder.fork("media");
|
|
208
|
+
|
|
209
|
+
// Initialize an empty array to store screen media queries
|
|
210
|
+
const media: CSSMediaQuery[] = [];
|
|
211
|
+
|
|
212
|
+
// Iterate over all media queries in the mediaRule
|
|
213
|
+
for (const mediaQuery of mediaRule.query.mediaQueries) {
|
|
214
|
+
if (
|
|
215
|
+
// If this is only a media query
|
|
216
|
+
(mediaQuery.mediaType === "print" && mediaQuery.qualifier !== "not") ||
|
|
217
|
+
// If this is a @media not print {}
|
|
218
|
+
// We can only do this if there are no conditions, as @media not print and (min-width: 100px) could be valid
|
|
219
|
+
(mediaQuery.mediaType !== "print" &&
|
|
220
|
+
mediaQuery.qualifier === "not" &&
|
|
221
|
+
mediaQuery.condition === null)
|
|
222
|
+
) {
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
media.push(mediaQuery);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (media.length === 0) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
for (const m of media) {
|
|
234
|
+
parseMediaQuery(m, builder);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Iterate over all rules in the mediaRule and extract their styles using the updated CompilerCollection
|
|
238
|
+
for (const rule of mediaRule.rules) {
|
|
239
|
+
extractRule(rule, builder);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @param containerRule - The ContainerRule object containing the container query and its rules.
|
|
245
|
+
* @param collection - The CompilerCollection object to use when extracting styles.
|
|
246
|
+
* @param parseOptions - The CssToReactNativeRuntimeOptions object to use when parsing styles.
|
|
247
|
+
*/
|
|
248
|
+
function extractContainer(
|
|
249
|
+
containerRule: ContainerRule,
|
|
250
|
+
builder: StylesheetBuilder,
|
|
251
|
+
) {
|
|
252
|
+
builder = builder.fork("container");
|
|
253
|
+
|
|
254
|
+
// Iterate over all rules inside the containerRule and extract their styles using the updated CompilerCollection
|
|
255
|
+
for (const rule of containerRule.rules) {
|
|
256
|
+
const query: ContainerQuery = {
|
|
257
|
+
m: parseContainerCondition(containerRule.condition, builder),
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
if (containerRule.name) {
|
|
261
|
+
query.n = containerRule.name;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
builder.addContainerQuery(query);
|
|
265
|
+
|
|
266
|
+
extractRule(rule, builder);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { Debugger } from "debug";
|
|
3
|
+
import type { MediaFeatureNameFor_MediaFeatureId } from "lightningcss";
|
|
4
|
+
|
|
5
|
+
import { VAR_SYMBOL } from "../runtime/native/reactivity";
|
|
6
|
+
|
|
7
|
+
export interface CompilerOptions {
|
|
8
|
+
inlineRem?: number | false;
|
|
9
|
+
grouping?: (string | RegExp)[];
|
|
10
|
+
selectorPrefix?: string;
|
|
11
|
+
stylesheetOrder?: number;
|
|
12
|
+
features?: FeatureFlagRecord;
|
|
13
|
+
logger?: (message: string) => void | Debugger;
|
|
14
|
+
/** Strip unused variables declarations. Defaults: false */
|
|
15
|
+
stripUnusedVariables?: boolean;
|
|
16
|
+
/** @internal */
|
|
17
|
+
ignorePropertyWarningRegex?: (string | RegExp)[];
|
|
18
|
+
preserveVariables?: boolean;
|
|
19
|
+
hexColors?: boolean;
|
|
20
|
+
colorPrecision?: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A `react-native-css` StyleSheet
|
|
25
|
+
*/
|
|
26
|
+
export type ReactNativeCssStyleSheet = ReactNativeCssStyleSheet_V2;
|
|
27
|
+
|
|
28
|
+
export interface ReactNativeCssStyleSheet_V2 {
|
|
29
|
+
/** Feature flags */
|
|
30
|
+
f?: FeatureFlagRecord;
|
|
31
|
+
/** rem */
|
|
32
|
+
r?: number;
|
|
33
|
+
/** StyleRuleSets */
|
|
34
|
+
s?: (readonly [string, StyleRuleSet])[];
|
|
35
|
+
/** KeyFrames */
|
|
36
|
+
k?: Animation_V2[];
|
|
37
|
+
/** Root Variables */
|
|
38
|
+
vr?: [string, LightDarkVariable][];
|
|
39
|
+
/** Universal Variables */
|
|
40
|
+
vu?: [string, LightDarkVariable][];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/******************************** Styles ********************************/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The JS representation of a style object
|
|
47
|
+
*
|
|
48
|
+
* This CSS rule is a single StyleRuleSet, made up of multiple StyleRules
|
|
49
|
+
*
|
|
50
|
+
* ```css
|
|
51
|
+
* .my-class {
|
|
52
|
+
* color: red;
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
* Properties are split into normal and important properties, and then split
|
|
56
|
+
* into different StyleRules depending on their specificity, conditions, etc
|
|
57
|
+
*/
|
|
58
|
+
export type StyleRuleSet = StyleRule[];
|
|
59
|
+
|
|
60
|
+
export interface StyleRule {
|
|
61
|
+
/** Specificity */
|
|
62
|
+
s: SpecificityArray;
|
|
63
|
+
/** Declarations */
|
|
64
|
+
d?: StyleDeclaration[];
|
|
65
|
+
/** Variables */
|
|
66
|
+
v?: VariableDescriptor[];
|
|
67
|
+
/** Named Containers */
|
|
68
|
+
c?: string[];
|
|
69
|
+
|
|
70
|
+
/** Declarations use variables */
|
|
71
|
+
dv?: number;
|
|
72
|
+
|
|
73
|
+
// Target override
|
|
74
|
+
target?: string | string[] | false;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Conditionals
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/** MediaQuery */
|
|
81
|
+
m?: MediaCondition[];
|
|
82
|
+
/** PseudoClassesQuery */
|
|
83
|
+
p?: PseudoClassesQuery;
|
|
84
|
+
/** Container Query */
|
|
85
|
+
cq?: ContainerQuery[];
|
|
86
|
+
/** Attribute Conditions */
|
|
87
|
+
aq?: AttributeQuery[];
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Animations and Transitions
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
/** Animations */
|
|
94
|
+
a?: boolean;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type StyleDeclaration =
|
|
98
|
+
/** This is a static style object */
|
|
99
|
+
| Record<string, StyleDescriptor>
|
|
100
|
+
/** A style that needs to be set */
|
|
101
|
+
| [StyleDescriptor, string | string[]]
|
|
102
|
+
/** A value that can only be computed at runtime */
|
|
103
|
+
| [StyleFunction, string | string[]]
|
|
104
|
+
/** A value that can only be computed at runtime, and only after styles have been calculated */
|
|
105
|
+
| [StyleFunction, string | string[], 1];
|
|
106
|
+
|
|
107
|
+
export type StyleDescriptor =
|
|
108
|
+
| string
|
|
109
|
+
| number
|
|
110
|
+
| boolean
|
|
111
|
+
| undefined
|
|
112
|
+
| StyleFunction
|
|
113
|
+
| StyleDescriptor[];
|
|
114
|
+
|
|
115
|
+
export type StyleFunction =
|
|
116
|
+
| [
|
|
117
|
+
Record<never, never>,
|
|
118
|
+
string, // string
|
|
119
|
+
]
|
|
120
|
+
| readonly [
|
|
121
|
+
Record<never, never>,
|
|
122
|
+
string, // string
|
|
123
|
+
]
|
|
124
|
+
| [
|
|
125
|
+
Record<never, never>,
|
|
126
|
+
string, // string
|
|
127
|
+
StyleDescriptor, // arguments
|
|
128
|
+
]
|
|
129
|
+
| readonly [
|
|
130
|
+
Record<never, never>,
|
|
131
|
+
string, // string
|
|
132
|
+
StyleDescriptor, // arguments
|
|
133
|
+
]
|
|
134
|
+
| [
|
|
135
|
+
Record<never, never>,
|
|
136
|
+
string, // string
|
|
137
|
+
StyleDescriptor, // arguments
|
|
138
|
+
1, // Should process after styles have been calculated
|
|
139
|
+
]
|
|
140
|
+
| readonly [
|
|
141
|
+
Record<never, never>,
|
|
142
|
+
string, // string
|
|
143
|
+
StyleDescriptor, // arguments
|
|
144
|
+
1, // Should process after styles have been calculated
|
|
145
|
+
];
|
|
146
|
+
|
|
147
|
+
/****************************** Variables *******************************/
|
|
148
|
+
|
|
149
|
+
export type VariableDescriptor = [string, StyleDescriptor];
|
|
150
|
+
export type VariableRecord = Record<string, LightDarkVariable>;
|
|
151
|
+
export type LightDarkVariable =
|
|
152
|
+
| [StyleDescriptor]
|
|
153
|
+
| [StyleDescriptor, StyleDescriptor];
|
|
154
|
+
|
|
155
|
+
export type InlineVariable = {
|
|
156
|
+
[VAR_SYMBOL]: "inline";
|
|
157
|
+
[key: string]: unknown | undefined;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/****************************** Animations V2 ******************************/
|
|
161
|
+
|
|
162
|
+
export type Animation_V2 = [string, AnimationKeyframes_V2[]];
|
|
163
|
+
export type AnimationRecord = Record<string, AnimationKeyframes_V2[]>;
|
|
164
|
+
export type AnimationKeyframes_V2 = [string | number, StyleDeclaration[]];
|
|
165
|
+
|
|
166
|
+
/****************************** Conditions ******************************/
|
|
167
|
+
|
|
168
|
+
export type MediaCondition =
|
|
169
|
+
// Boolean
|
|
170
|
+
| ["!!", MediaFeatureNameFor_MediaFeatureId]
|
|
171
|
+
// Not
|
|
172
|
+
| ["!", MediaCondition]
|
|
173
|
+
// And
|
|
174
|
+
| ["&", MediaCondition[]]
|
|
175
|
+
// Or
|
|
176
|
+
| ["|", MediaCondition[]]
|
|
177
|
+
// Comparison
|
|
178
|
+
| [
|
|
179
|
+
MediaFeatureComparison,
|
|
180
|
+
MediaFeatureNameFor_MediaFeatureId | MediaFeatureNameFor_MediaFeatureId,
|
|
181
|
+
StyleDescriptor,
|
|
182
|
+
]
|
|
183
|
+
// [Start, End]
|
|
184
|
+
| [
|
|
185
|
+
"[]",
|
|
186
|
+
MediaFeatureNameFor_MediaFeatureId,
|
|
187
|
+
StyleDescriptor, // Start
|
|
188
|
+
MediaFeatureComparison, // Start comparison
|
|
189
|
+
StyleDescriptor, // End
|
|
190
|
+
MediaFeatureComparison, // End comparison
|
|
191
|
+
];
|
|
192
|
+
|
|
193
|
+
export type MediaFeatureComparison = "=" | ">" | ">=" | "<" | "<=";
|
|
194
|
+
|
|
195
|
+
export interface PseudoClassesQuery {
|
|
196
|
+
/** Hover */
|
|
197
|
+
h?: 1;
|
|
198
|
+
/** Active */
|
|
199
|
+
a?: 1;
|
|
200
|
+
/** Focus */
|
|
201
|
+
f?: 1;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
type AttributeQueryType =
|
|
205
|
+
| "a" // Attribute
|
|
206
|
+
| "d"; // Data-Attribute
|
|
207
|
+
|
|
208
|
+
export type AttributeQuery =
|
|
209
|
+
| [AttributeQueryType, string] // Exists
|
|
210
|
+
| [AttributeQueryType, string, "!"] // Falsy
|
|
211
|
+
| [AttributeQueryType, string, AttrSelectorOperator, string] // Use operator
|
|
212
|
+
| [AttributeQueryType, string, AttrSelectorOperator, string, "i" | "s"]; // Case sensitivity
|
|
213
|
+
|
|
214
|
+
export type AttrSelectorOperator = "=" | "~=" | "|=" | "^=" | "$=" | "*=";
|
|
215
|
+
|
|
216
|
+
/****************************** Containers *****************************/
|
|
217
|
+
|
|
218
|
+
export interface ContainerQuery {
|
|
219
|
+
/** Name */
|
|
220
|
+
n?: string | null;
|
|
221
|
+
m?: MediaCondition;
|
|
222
|
+
p?: PseudoClassesQuery;
|
|
223
|
+
a?: AttributeQuery[];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/****************************** Specificity *****************************/
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* https://drafts.csswg.org/selectors/#specificity-rules
|
|
230
|
+
*
|
|
231
|
+
* This array is sorted by most common values when parsing a StyleSheet
|
|
232
|
+
*/
|
|
233
|
+
export type SpecificityArray = SpecificityValue[];
|
|
234
|
+
export type SpecificityValue = number | undefined;
|
|
235
|
+
|
|
236
|
+
/****************************** Compiler ********************************/
|
|
237
|
+
|
|
238
|
+
type FeatureFlags = never;
|
|
239
|
+
export type FeatureFlagRecord = Partial<Record<FeatureFlags, boolean>>;
|
|
240
|
+
|
|
241
|
+
/** @internal */
|
|
242
|
+
export type PathTokens = string | string[];
|
|
243
|
+
/** @internal */
|
|
244
|
+
export type StyleRuleMapping = Record<string, PathTokens>;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @internal
|
|
248
|
+
*/
|
|
249
|
+
export type LoggerOptions = {
|
|
250
|
+
logger: (message: string) => void;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @internal
|
|
255
|
+
*/
|
|
256
|
+
export interface CompilerCollection extends CompilerOptions {
|
|
257
|
+
features: FeatureFlagRecord;
|
|
258
|
+
rules: Map<string, StyleRule[]>;
|
|
259
|
+
keyframes: Map<string, AnimationKeyframes_V2[]>;
|
|
260
|
+
darkMode?: string | null;
|
|
261
|
+
rootVariables: VariableRecord;
|
|
262
|
+
universalVariables: VariableRecord;
|
|
263
|
+
selectorPrefix?: string;
|
|
264
|
+
appearanceOrder: number;
|
|
265
|
+
rem?: number | boolean;
|
|
266
|
+
varUsageCount: Map<string, number>;
|
|
267
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type {
|
|
3
|
+
ContainerCondition as CSSContainerCondition,
|
|
4
|
+
QueryFeatureFor_ContainerSizeFeatureId,
|
|
5
|
+
} from "lightningcss";
|
|
6
|
+
|
|
7
|
+
import type { MediaCondition } from "./compiler.types";
|
|
8
|
+
import {
|
|
9
|
+
parseMediaFeatureOperator,
|
|
10
|
+
parseMediaFeatureValue,
|
|
11
|
+
} from "./media-query";
|
|
12
|
+
import type { StylesheetBuilder } from "./stylesheet";
|
|
13
|
+
|
|
14
|
+
export function parseContainerCondition(
|
|
15
|
+
condition: CSSContainerCondition,
|
|
16
|
+
builder: StylesheetBuilder,
|
|
17
|
+
) {
|
|
18
|
+
let containerQuery = parseContainerQueryCondition(condition, builder);
|
|
19
|
+
|
|
20
|
+
// If any of these are undefined, the media query is invalid
|
|
21
|
+
if (!containerQuery || containerQuery.some((v) => v === undefined)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return containerQuery;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function parseContainerQueryCondition(
|
|
29
|
+
condition: CSSContainerCondition,
|
|
30
|
+
builder: StylesheetBuilder,
|
|
31
|
+
): MediaCondition | undefined {
|
|
32
|
+
switch (condition.type) {
|
|
33
|
+
case "feature":
|
|
34
|
+
return parseFeature(condition.value, builder);
|
|
35
|
+
case "not":
|
|
36
|
+
const query = parseContainerCondition(condition.value, builder);
|
|
37
|
+
return query ? ["!", query] : undefined;
|
|
38
|
+
case "operation":
|
|
39
|
+
const conditions = condition.conditions
|
|
40
|
+
.map((c) => parseContainerQueryCondition(c, builder))
|
|
41
|
+
.filter((v): v is MediaCondition => !!v);
|
|
42
|
+
|
|
43
|
+
if (conditions.length === 0) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
switch (condition.operator) {
|
|
48
|
+
case "and":
|
|
49
|
+
return ["&", conditions];
|
|
50
|
+
case "or":
|
|
51
|
+
return ["|", conditions];
|
|
52
|
+
default:
|
|
53
|
+
condition.operator satisfies never;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
case "style":
|
|
57
|
+
// We don't support these yet
|
|
58
|
+
return;
|
|
59
|
+
default:
|
|
60
|
+
condition satisfies never;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function parseFeature(
|
|
66
|
+
feature: QueryFeatureFor_ContainerSizeFeatureId,
|
|
67
|
+
builder: StylesheetBuilder,
|
|
68
|
+
): MediaCondition | undefined {
|
|
69
|
+
switch (feature.type) {
|
|
70
|
+
case "boolean":
|
|
71
|
+
return ["!!", feature.name];
|
|
72
|
+
case "plain":
|
|
73
|
+
return [
|
|
74
|
+
"=",
|
|
75
|
+
feature.name,
|
|
76
|
+
parseMediaFeatureValue(feature.value, builder),
|
|
77
|
+
];
|
|
78
|
+
case "range":
|
|
79
|
+
return [
|
|
80
|
+
parseMediaFeatureOperator(feature.operator),
|
|
81
|
+
feature.name,
|
|
82
|
+
parseMediaFeatureValue(feature.value, builder),
|
|
83
|
+
];
|
|
84
|
+
case "interval":
|
|
85
|
+
return [
|
|
86
|
+
"[]",
|
|
87
|
+
feature.name,
|
|
88
|
+
parseMediaFeatureValue(feature.start, builder),
|
|
89
|
+
parseMediaFeatureOperator(feature.startOperator),
|
|
90
|
+
parseMediaFeatureValue(feature.end, builder),
|
|
91
|
+
parseMediaFeatureOperator(feature.endOperator),
|
|
92
|
+
];
|
|
93
|
+
default:
|
|
94
|
+
feature satisfies never;
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
}
|