react-native-css 3.0.0-nightly.75f8b74 → 3.0.0-nightly.9c84741
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/dist/commonjs/compiler/atRules.js +16 -3
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +37 -21
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +255 -154
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/inheritance.test.js +15 -15
- package/dist/commonjs/compiler/inheritance.test.js.map +1 -1
- package/dist/commonjs/compiler/keyframes.js +1 -1
- package/dist/commonjs/compiler/keyframes.js.map +1 -1
- package/dist/commonjs/compiler/pseudo-elements.js +49 -0
- package/dist/commonjs/compiler/pseudo-elements.js.map +1 -0
- package/dist/commonjs/compiler/selector-builder.js +501 -0
- package/dist/commonjs/compiler/selector-builder.js.map +1 -0
- package/dist/commonjs/compiler/selectors.js +10 -6
- package/dist/commonjs/compiler/selectors.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +137 -46
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/compiler/supports.js +27 -0
- package/dist/commonjs/compiler/supports.js.map +1 -0
- package/dist/commonjs/components/ActivityIndicator.js +22 -0
- package/dist/commonjs/components/ActivityIndicator.js.map +1 -0
- package/dist/commonjs/components/Button.js +22 -0
- package/dist/commonjs/components/Button.js.map +1 -0
- package/dist/commonjs/components/FlatList.js +19 -0
- package/dist/commonjs/components/FlatList.js.map +1 -0
- package/dist/commonjs/components/Image.js +17 -0
- package/dist/commonjs/components/Image.js.map +1 -0
- package/dist/commonjs/components/Switch.js +17 -0
- package/dist/commonjs/components/Switch.js.map +1 -0
- package/dist/commonjs/components/TextInput.js +17 -0
- package/dist/commonjs/components/TextInput.js.map +1 -0
- package/dist/commonjs/components/index.js +48 -0
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/components/react-native-safe-area-context.js +17 -0
- package/dist/commonjs/components/react-native-safe-area-context.js.map +1 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js +53 -0
- package/dist/commonjs/components/react-native-safe-area-context.native.js.map +1 -0
- package/dist/commonjs/jest/index.js +30 -12
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/index.js +7 -4
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/injection-code.js +5 -10
- package/dist/commonjs/metro/injection-code.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +18 -8
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/metro/resolver.js +3 -0
- package/dist/commonjs/metro/resolver.js.map +1 -1
- package/dist/commonjs/poison.pill.js +14 -11
- package/dist/commonjs/poison.pill.js.map +1 -1
- package/dist/commonjs/runtime/native/api.js +8 -2
- package/dist/commonjs/runtime/native/api.js.map +1 -1
- 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 +28 -21
- package/dist/commonjs/runtime/native/conditions/container-query.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/guards.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/index.js +12 -46
- package/dist/commonjs/runtime/native/conditions/index.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/media-query.js +26 -21
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/runtime/native/react/interaction.js +10 -10
- package/dist/commonjs/runtime/native/react/interaction.js.map +1 -1
- package/dist/commonjs/runtime/native/react/rules.js +33 -27
- package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
- package/dist/commonjs/runtime/native/react/useNativeCss.js +3 -2
- package/dist/commonjs/runtime/native/react/useNativeCss.js.map +1 -1
- package/dist/commonjs/runtime/native/reactivity.js +12 -12
- package/dist/commonjs/runtime/native/reactivity.js.map +1 -1
- package/dist/commonjs/runtime/native/reanimated.js +17 -0
- package/dist/commonjs/runtime/native/reanimated.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/calculate-props.js +63 -38
- package/dist/commonjs/runtime/native/styles/calculate-props.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/defaults.js +1 -1
- package/dist/commonjs/runtime/native/styles/defaults.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/functions/animation-timing.js +34 -0
- package/dist/commonjs/runtime/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/calc.js +125 -0
- package/dist/commonjs/runtime/native/styles/functions/calc.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{filters.js → functions/filters.js} +3 -3
- package/dist/commonjs/runtime/native/styles/functions/filters.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/index.js +83 -0
- package/dist/commonjs/runtime/native/styles/functions/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js +32 -0
- package/dist/commonjs/runtime/native/styles/functions/numeric-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +3 -3
- package/dist/commonjs/runtime/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/string-functions.js +23 -0
- package/dist/commonjs/runtime/native/styles/functions/string-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/functions/transform-functions.js +121 -0
- package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/index.js +12 -12
- package/dist/commonjs/runtime/native/styles/index.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/resolve.js +21 -44
- package/dist/commonjs/runtime/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
- package/dist/commonjs/runtime/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{animation.js → shorthands/animation.js} +6 -37
- package/dist/commonjs/runtime/native/styles/shorthands/animation.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{border.js → shorthands/border.js} +2 -2
- package/dist/commonjs/runtime/native/styles/shorthands/border.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js +50 -0
- package/dist/commonjs/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/shorthands/index.js +61 -0
- package/dist/commonjs/runtime/native/styles/shorthands/index.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +2 -2
- package/dist/commonjs/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
- package/dist/commonjs/runtime/native/styles/shorthands/transform.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/units.js +7 -4
- package/dist/commonjs/runtime/native/styles/units.js.map +1 -1
- package/dist/commonjs/runtime/native/styles/variables.js +3 -2
- package/dist/commonjs/runtime/native/styles/variables.js.map +1 -1
- package/dist/commonjs/runtime/utils/objects.js +14 -6
- package/dist/commonjs/runtime/utils/objects.js.map +1 -1
- package/dist/commonjs/runtime/utils/specificity.js +2 -1
- package/dist/commonjs/runtime/utils/specificity.js.map +1 -1
- package/dist/commonjs/runtime/web/api.js.map +1 -1
- package/dist/commonjs/style-collection/index.js +110 -0
- package/dist/commonjs/style-collection/index.js.map +1 -0
- package/dist/commonjs/style-collection/root.js +28 -0
- package/dist/commonjs/style-collection/root.js.map +1 -0
- package/dist/module/compiler/atRules.js +16 -3
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +37 -21
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/compiler.types.js +1 -1
- package/dist/module/compiler/compiler.types.js.map +1 -1
- package/dist/module/compiler/declarations.js +250 -150
- package/dist/module/compiler/declarations.js.map +1 -1
- package/dist/module/compiler/inheritance.test.js +15 -15
- package/dist/module/compiler/inheritance.test.js.map +1 -1
- package/dist/module/compiler/keyframes.js +1 -1
- package/dist/module/compiler/keyframes.js.map +1 -1
- package/dist/module/compiler/pseudo-elements.js +44 -0
- package/dist/module/compiler/pseudo-elements.js.map +1 -0
- package/dist/module/compiler/selector-builder.js +496 -0
- package/dist/module/compiler/selector-builder.js.map +1 -0
- package/dist/module/compiler/selectors.js +10 -6
- package/dist/module/compiler/selectors.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +136 -45
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/compiler/supports.js +23 -0
- package/dist/module/compiler/supports.js.map +1 -0
- package/dist/module/components/ActivityIndicator.js +17 -0
- package/dist/module/components/ActivityIndicator.js.map +1 -0
- package/dist/module/components/Button.js +17 -0
- package/dist/module/components/Button.js.map +1 -0
- package/dist/module/components/FlatList.js +14 -0
- package/dist/module/components/FlatList.js.map +1 -0
- package/dist/module/components/Image.js +12 -0
- package/dist/module/components/Image.js.map +1 -0
- package/dist/module/components/Switch.js +12 -0
- package/dist/module/components/Switch.js.map +1 -0
- package/dist/module/components/TextInput.js +12 -0
- package/dist/module/components/TextInput.js.map +1 -0
- package/dist/module/components/index.js +6 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/react-native-safe-area-context.js +4 -0
- package/dist/module/components/react-native-safe-area-context.js.map +1 -0
- package/dist/module/components/react-native-safe-area-context.native.js +36 -0
- package/dist/module/components/react-native-safe-area-context.native.js.map +1 -0
- package/dist/module/jest/index.js +28 -10
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/index.js +7 -4
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/injection-code.js +5 -10
- package/dist/module/metro/injection-code.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +18 -8
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/resolver.js +3 -0
- package/dist/module/metro/resolver.js.map +1 -1
- package/dist/module/poison.pill.js +14 -11
- package/dist/module/poison.pill.js.map +1 -1
- package/dist/module/runtime/native/api.js +2 -1
- package/dist/module/runtime/native/api.js.map +1 -1
- 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 +28 -21
- package/dist/module/runtime/native/conditions/container-query.js.map +1 -1
- package/dist/module/runtime/native/conditions/guards.js.map +1 -1
- package/dist/module/runtime/native/conditions/index.js +12 -46
- package/dist/module/runtime/native/conditions/index.js.map +1 -1
- package/dist/module/runtime/native/conditions/media-query.js +27 -22
- package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
- package/dist/module/runtime/native/react/interaction.js +10 -10
- package/dist/module/runtime/native/react/interaction.js.map +1 -1
- package/dist/module/runtime/native/react/rules.js +31 -26
- package/dist/module/runtime/native/react/rules.js.map +1 -1
- package/dist/module/runtime/native/react/useNativeCss.js +2 -1
- package/dist/module/runtime/native/react/useNativeCss.js.map +1 -1
- package/dist/module/runtime/native/reactivity.js +11 -11
- package/dist/module/runtime/native/reactivity.js.map +1 -1
- package/dist/module/runtime/native/reanimated.js +13 -0
- package/dist/module/runtime/native/reanimated.js.map +1 -0
- package/dist/module/runtime/native/styles/calculate-props.js +64 -39
- package/dist/module/runtime/native/styles/calculate-props.js.map +1 -1
- package/dist/module/runtime/native/styles/defaults.js +1 -1
- package/dist/module/runtime/native/styles/defaults.js.map +1 -1
- package/dist/module/runtime/native/styles/functions/animation-timing.js +30 -0
- package/dist/module/runtime/native/styles/functions/animation-timing.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/calc.js +120 -0
- package/dist/module/runtime/native/styles/functions/calc.js.map +1 -0
- package/dist/module/runtime/native/styles/{filters.js → functions/filters.js} +2 -2
- package/dist/module/runtime/native/styles/functions/filters.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/index.js +10 -0
- package/dist/module/runtime/native/styles/functions/index.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/numeric-functions.js +25 -0
- package/dist/module/runtime/native/styles/functions/numeric-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/{platform-functions.js → functions/platform-functions.js} +1 -1
- package/dist/module/runtime/native/styles/functions/platform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/string-functions.js +18 -0
- package/dist/module/runtime/native/styles/functions/string-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/functions/transform-functions.js +114 -0
- package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
- package/dist/module/runtime/native/styles/index.js +12 -12
- package/dist/module/runtime/native/styles/index.js.map +1 -1
- package/dist/module/runtime/native/styles/resolve.js +20 -44
- package/dist/module/runtime/native/styles/resolve.js.map +1 -1
- package/dist/module/runtime/native/styles/{shorthand.js → shorthands/_handler.js} +5 -5
- package/dist/module/runtime/native/styles/shorthands/_handler.js.map +1 -0
- package/dist/module/runtime/native/styles/{animation.js → shorthands/animation.js} +3 -34
- package/dist/module/runtime/native/styles/shorthands/animation.js.map +1 -0
- package/dist/module/runtime/native/styles/{border.js → shorthands/border.js} +1 -1
- package/dist/module/runtime/native/styles/shorthands/border.js.map +1 -0
- package/dist/module/runtime/native/styles/{box-shadow.js → shorthands/box-shadow.js} +16 -6
- package/dist/module/runtime/native/styles/shorthands/box-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/shorthands/index.js +8 -0
- package/dist/module/runtime/native/styles/shorthands/index.js.map +1 -0
- package/dist/module/runtime/native/styles/{text-shadow.js → shorthands/text-shadow.js} +1 -1
- package/dist/module/runtime/native/styles/shorthands/text-shadow.js.map +1 -0
- package/dist/module/runtime/native/styles/{transform.js → shorthands/transform.js} +1 -1
- package/dist/module/runtime/native/styles/shorthands/transform.js.map +1 -0
- package/dist/module/runtime/native/styles/units.js +7 -4
- package/dist/module/runtime/native/styles/units.js.map +1 -1
- package/dist/module/runtime/native/styles/variables.js +2 -1
- package/dist/module/runtime/native/styles/variables.js.map +1 -1
- package/dist/module/runtime/utils/objects.js +14 -6
- package/dist/module/runtime/utils/objects.js.map +1 -1
- package/dist/module/runtime/utils/specificity.js +2 -1
- package/dist/module/runtime/utils/specificity.js.map +1 -1
- package/dist/module/runtime/web/api.js.map +1 -1
- package/dist/module/style-collection/index.js +95 -0
- package/dist/module/style-collection/index.js.map +1 -0
- package/dist/module/style-collection/root.js +24 -0
- package/dist/module/style-collection/root.js.map +1 -0
- package/dist/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts +9 -2
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +16 -17
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +18 -19
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts +4 -0
- package/dist/typescript/commonjs/src/compiler/pseudo-elements.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts +24 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts +3 -2
- package/dist/typescript/commonjs/src/compiler/selectors.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +23 -9
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/supports.d.ts +3 -0
- package/dist/typescript/commonjs/src/compiler/supports.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +13 -0
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Button.d.ts +13 -0
- package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/FlatList.d.ts +10 -0
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Image.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Switch.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/Switch.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TextInput.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts +4 -0
- package/dist/typescript/commonjs/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/jest/index.d.ts +20 -3
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts +4 -7
- package/dist/typescript/commonjs/src/metro/injection-code.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts +4 -1
- package/dist/typescript/commonjs/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/poison.pill.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts +3 -1
- package/dist/typescript/commonjs/src/runtime/native/api.d.ts.map +1 -1
- 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 +3 -3
- package/dist/typescript/commonjs/src/runtime/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts +2 -2
- package/dist/typescript/commonjs/src/runtime/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts +2 -1
- package/dist/typescript/commonjs/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts +2 -10
- package/dist/typescript/commonjs/src/runtime/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/defaults.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts +8 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/numeric-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-functions.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/string-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts +6 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/utils/objects.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts +1 -0
- package/dist/typescript/commonjs/src/runtime/utils/specificity.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts +1 -1
- package/dist/typescript/commonjs/src/runtime/web/api.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/style-collection/index.d.ts +14 -0
- package/dist/typescript/commonjs/src/style-collection/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/style-collection/root.d.ts +11 -0
- package/dist/typescript/commonjs/src/style-collection/root.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts +9 -2
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +16 -17
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +18 -19
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts +4 -0
- package/dist/typescript/module/src/compiler/pseudo-elements.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts +24 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selectors.d.ts +3 -2
- package/dist/typescript/module/src/compiler/selectors.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +23 -9
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/supports.d.ts +3 -0
- package/dist/typescript/module/src/compiler/supports.d.ts.map +1 -0
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts +13 -0
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Button.d.ts +13 -0
- package/dist/typescript/module/src/components/Button.d.ts.map +1 -0
- package/dist/typescript/module/src/components/FlatList.d.ts +10 -0
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Image.d.ts +8 -0
- package/dist/typescript/module/src/components/Image.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Switch.d.ts +8 -0
- package/dist/typescript/module/src/components/Switch.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TextInput.d.ts +8 -0
- package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +6 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts +2 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.d.ts.map +1 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts +4 -0
- package/dist/typescript/module/src/components/react-native-safe-area-context.native.d.ts.map +1 -0
- package/dist/typescript/module/src/jest/index.d.ts +20 -3
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/index.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/injection-code.d.ts +4 -7
- package/dist/typescript/module/src/metro/injection-code.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts +4 -1
- package/dist/typescript/module/src/metro/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/module/src/poison.pill.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/api.d.ts +3 -1
- package/dist/typescript/module/src/runtime/native/api.d.ts.map +1 -1
- 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 +3 -3
- package/dist/typescript/module/src/runtime/native/conditions/container-query.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/conditions/guards.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/conditions/index.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/conditions/media-query.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/react/interaction.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts +2 -2
- package/dist/typescript/module/src/runtime/native/react/rules.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts +2 -1
- package/dist/typescript/module/src/runtime/native/react/useNativeCss.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts +2 -10
- package/dist/typescript/module/src/runtime/native/reactivity.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/reanimated.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/reanimated.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts +1 -1
- package/dist/typescript/module/src/runtime/native/styles/calculate-props.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/defaults.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/animation-timing.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/calc.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/{filters.d.ts → functions/filters.d.ts} +1 -1
- package/dist/typescript/module/src/runtime/native/styles/functions/filters.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts +8 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/numeric-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/{platform-functions.d.ts → functions/platform-functions.d.ts} +2 -2
- package/dist/typescript/module/src/runtime/native/styles/functions/platform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/string-functions.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/string-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts +5 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/transform-functions.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/{shorthand.d.ts → shorthands/_handler.d.ts} +2 -2
- package/dist/typescript/module/src/runtime/native/styles/shorthands/_handler.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts +4 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/animation.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/border.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts +3 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/box-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts +6 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/index.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts +2 -0
- package/dist/typescript/module/src/runtime/native/styles/shorthands/text-shadow.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/{transform.d.ts → shorthands/transform.d.ts} +1 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthands/transform.d.ts.map +1 -0
- package/dist/typescript/module/src/runtime/native/styles/units.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/styles/variables.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/utils/objects.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts +1 -0
- package/dist/typescript/module/src/runtime/utils/specificity.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/web/api.d.ts +1 -1
- package/dist/typescript/module/src/runtime/web/api.d.ts.map +1 -1
- package/dist/typescript/module/src/style-collection/index.d.ts +14 -0
- package/dist/typescript/module/src/style-collection/index.d.ts.map +1 -0
- package/dist/typescript/module/src/style-collection/root.d.ts +11 -0
- package/dist/typescript/module/src/style-collection/root.d.ts.map +1 -0
- package/package.json +32 -16
- package/src/compiler/atRules.ts +17 -3
- package/src/compiler/compiler.ts +40 -33
- package/src/compiler/compiler.types.ts +18 -19
- package/src/compiler/declarations.ts +447 -192
- package/src/compiler/inheritance.test.ts +13 -13
- package/src/compiler/keyframes.ts +1 -1
- package/src/compiler/pseudo-elements.ts +54 -0
- package/src/compiler/selector-builder.ts +586 -0
- package/src/compiler/selectors.ts +20 -6
- package/src/compiler/stylesheet.ts +188 -53
- package/src/compiler/supports.ts +26 -0
- package/src/components/ActivityIndicator.tsx +27 -0
- package/src/components/Button.tsx +22 -0
- package/src/components/FlatList.tsx +21 -0
- package/src/components/Image.tsx +17 -0
- package/src/components/Switch.tsx +17 -0
- package/src/components/TextInput.tsx +17 -0
- package/src/components/index.tsx +6 -0
- package/src/components/react-native-safe-area-context.native.tsx +40 -0
- package/src/components/react-native-safe-area-context.tsx +1 -0
- package/src/jest/index.ts +35 -10
- package/src/metro/index.ts +12 -7
- package/src/metro/injection-code.ts +6 -10
- package/src/metro/metro-transformer.ts +27 -10
- package/src/metro/resolver.ts +8 -0
- package/src/poison.pill.ts +15 -11
- package/src/runtime/native/api.ts +3 -1
- package/src/runtime/native/conditions/attributes.ts +52 -0
- package/src/runtime/native/conditions/container-query.ts +27 -22
- package/src/runtime/native/conditions/guards.ts +1 -2
- package/src/runtime/native/conditions/index.ts +14 -66
- package/src/runtime/native/conditions/media-query.ts +29 -25
- package/src/runtime/native/react/interaction.ts +12 -12
- package/src/runtime/native/react/rules.ts +34 -24
- package/src/runtime/native/react/useNativeCss.ts +4 -1
- package/src/runtime/native/reactivity.ts +14 -21
- package/src/runtime/native/reanimated.ts +22 -0
- package/src/runtime/native/styles/calculate-props.ts +71 -39
- package/src/runtime/native/styles/defaults.ts +1 -0
- package/src/runtime/native/styles/functions/animation-timing.ts +44 -0
- package/src/runtime/native/styles/functions/calc.ts +121 -0
- package/src/runtime/native/styles/{filters.ts → functions/filters.ts} +3 -3
- package/src/runtime/native/styles/functions/index.ts +7 -0
- package/src/runtime/native/styles/functions/numeric-functions.ts +38 -0
- package/src/runtime/native/styles/{platform-functions.ts → functions/platform-functions.ts} +2 -2
- package/src/runtime/native/styles/functions/string-functions.ts +22 -0
- package/src/runtime/native/styles/functions/transform-functions.ts +84 -0
- package/src/runtime/native/styles/index.ts +12 -12
- package/src/runtime/native/styles/resolve.ts +20 -63
- package/src/runtime/native/styles/{shorthand.ts → shorthands/_handler.ts} +5 -5
- package/src/runtime/native/styles/{animation.ts → shorthands/animation.ts} +4 -62
- package/src/runtime/native/styles/{border.ts → shorthands/border.ts} +1 -1
- package/src/runtime/native/styles/shorthands/box-shadow.ts +74 -0
- package/src/runtime/native/styles/shorthands/index.ts +5 -0
- package/src/runtime/native/styles/{text-shadow.ts → shorthands/text-shadow.ts} +1 -1
- package/src/runtime/native/styles/{transform.ts → shorthands/transform.ts} +4 -2
- package/src/runtime/native/styles/units.ts +8 -4
- package/src/runtime/native/styles/variables.ts +5 -5
- package/src/runtime/utils/objects.ts +16 -4
- package/src/runtime/utils/specificity.ts +1 -0
- package/src/runtime/web/api.ts +1 -1
- package/src/style-collection/index.ts +142 -0
- package/src/style-collection/root.ts +35 -0
- package/dist/commonjs/compiler/attributes.test.js +0 -20
- package/dist/commonjs/compiler/attributes.test.js.map +0 -1
- package/dist/commonjs/doctor/index.js +0 -6
- package/dist/commonjs/doctor/index.js.map +0 -1
- package/dist/commonjs/runtime/native/injection.js +0 -98
- package/dist/commonjs/runtime/native/injection.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/animation.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/border.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/box-shadow.js +0 -40
- package/dist/commonjs/runtime/native/styles/box-shadow.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/calc.js +0 -85
- package/dist/commonjs/runtime/native/styles/calc.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/filters.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/platform-functions.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/shorthand.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/text-shadow.js.map +0 -1
- package/dist/commonjs/runtime/native/styles/transform.js.map +0 -1
- package/dist/module/compiler/attributes.test.js +0 -20
- package/dist/module/compiler/attributes.test.js.map +0 -1
- package/dist/module/doctor/index.js +0 -4
- package/dist/module/doctor/index.js.map +0 -1
- package/dist/module/runtime/native/injection.js +0 -93
- package/dist/module/runtime/native/injection.js.map +0 -1
- package/dist/module/runtime/native/styles/animation.js.map +0 -1
- package/dist/module/runtime/native/styles/border.js.map +0 -1
- package/dist/module/runtime/native/styles/box-shadow.js.map +0 -1
- package/dist/module/runtime/native/styles/calc.js +0 -79
- package/dist/module/runtime/native/styles/calc.js.map +0 -1
- package/dist/module/runtime/native/styles/filters.js.map +0 -1
- package/dist/module/runtime/native/styles/platform-functions.js.map +0 -1
- package/dist/module/runtime/native/styles/shorthand.js.map +0 -1
- package/dist/module/runtime/native/styles/text-shadow.js.map +0 -1
- package/dist/module/runtime/native/styles/transform.js.map +0 -1
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts +0 -2
- package/dist/typescript/commonjs/src/compiler/attributes.test.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/doctor/index.d.ts +0 -2
- package/dist/typescript/commonjs/src/doctor/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -16
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts +0 -9
- package/dist/typescript/commonjs/src/runtime/native/styles/animation.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts +0 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/border.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts +0 -3
- package/dist/typescript/commonjs/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts +0 -3
- package/dist/typescript/commonjs/src/runtime/native/styles/calc.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/filters.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/shorthand.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts +0 -2
- package/dist/typescript/commonjs/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/styles/transform.d.ts.map +0 -1
- package/dist/typescript/module/src/compiler/attributes.test.d.ts +0 -2
- package/dist/typescript/module/src/compiler/attributes.test.d.ts.map +0 -1
- package/dist/typescript/module/src/doctor/index.d.ts +0 -2
- package/dist/typescript/module/src/doctor/index.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -16
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts +0 -9
- package/dist/typescript/module/src/runtime/native/styles/animation.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts +0 -2
- package/dist/typescript/module/src/runtime/native/styles/border.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts +0 -3
- package/dist/typescript/module/src/runtime/native/styles/box-shadow.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts +0 -3
- package/dist/typescript/module/src/runtime/native/styles/calc.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/filters.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/platform-functions.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/shorthand.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts +0 -2
- package/dist/typescript/module/src/runtime/native/styles/text-shadow.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/styles/transform.d.ts.map +0 -1
- package/src/compiler/attributes.test.ts +0 -28
- package/src/doctor/index.ts +0 -1
- package/src/runtime/native/injection.ts +0 -131
- package/src/runtime/native/styles/box-shadow.ts +0 -54
- package/src/runtime/native/styles/calc.ts +0 -97
|
@@ -13,8 +13,9 @@ exports.parseAlignItems = parseAlignItems;
|
|
|
13
13
|
exports.parseAlignSelf = parseAlignSelf;
|
|
14
14
|
exports.parseAngle = parseAngle;
|
|
15
15
|
exports.parseAspectRatio = parseAspectRatio;
|
|
16
|
-
exports.parseBorderBlockColor = parseBorderBlockColor;
|
|
17
16
|
exports.parseBorderBlockWidth = parseBorderBlockWidth;
|
|
17
|
+
exports.parseBorderInlineStyle = parseBorderInlineStyle;
|
|
18
|
+
exports.parseBorderInlineWidth = parseBorderInlineWidth;
|
|
18
19
|
exports.parseBorderSideWidth = parseBorderSideWidth;
|
|
19
20
|
exports.parseBorderSideWidthDeclaration = parseBorderSideWidthDeclaration;
|
|
20
21
|
exports.parseBorderStyle = parseBorderStyle;
|
|
@@ -24,10 +25,9 @@ exports.parseCalcArguments = parseCalcArguments;
|
|
|
24
25
|
exports.parseCalcFn = parseCalcFn;
|
|
25
26
|
exports.parseColor = parseColor;
|
|
26
27
|
exports.parseColorDeclaration = parseColorDeclaration;
|
|
27
|
-
exports.
|
|
28
|
+
exports.parseColorOrAutoDeclaration = parseColorOrAutoDeclaration;
|
|
29
|
+
exports.parseCustomDeclaration = parseCustomDeclaration;
|
|
28
30
|
exports.parseDeclaration = parseDeclaration;
|
|
29
|
-
exports.parseDeclarationCustom = parseDeclarationCustom;
|
|
30
|
-
exports.parseDeclarationUnparsed = parseDeclarationUnparsed;
|
|
31
31
|
exports.parseDimension = parseDimension;
|
|
32
32
|
exports.parseDimensionPercentageFor_LengthValue = parseDimensionPercentageFor_LengthValue;
|
|
33
33
|
exports.parseDisplay = parseDisplay;
|
|
@@ -67,6 +67,7 @@ exports.parseTextShadow = parseTextShadow;
|
|
|
67
67
|
exports.parseTime = parseTime;
|
|
68
68
|
exports.parseTranslateProp = parseTranslateProp;
|
|
69
69
|
exports.parseUnparsed = parseUnparsed;
|
|
70
|
+
exports.parseUnparsedDeclaration = parseUnparsedDeclaration;
|
|
70
71
|
exports.parseUnresolvedColor = parseUnresolvedColor;
|
|
71
72
|
exports.parseUserSelect = parseUserSelect;
|
|
72
73
|
exports.parseVerticalAlign = parseVerticalAlign;
|
|
@@ -83,7 +84,9 @@ const CommaSeparator = Symbol("CommaSeparator");
|
|
|
83
84
|
const propertyRename = {
|
|
84
85
|
"background-image": "experimental_backgroundImage"
|
|
85
86
|
};
|
|
86
|
-
|
|
87
|
+
|
|
88
|
+
// TODO: We need a better way to handle this
|
|
89
|
+
const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "text-shadow", "transform", "scale", "rotate", "translate"]);
|
|
87
90
|
const parsers = {
|
|
88
91
|
"align-content": parseAlignContent,
|
|
89
92
|
"align-items": parseAlignItems,
|
|
@@ -103,37 +106,45 @@ const parsers = {
|
|
|
103
106
|
"block-size": parseSizeDeclaration,
|
|
104
107
|
"border": parseBorder,
|
|
105
108
|
"border-block": parseBorderBlock,
|
|
106
|
-
"border-block-color":
|
|
109
|
+
"border-block-color": parseBorderColor,
|
|
107
110
|
"border-block-end": parseBorderBlockEnd,
|
|
108
111
|
"border-block-end-color": parseColorDeclaration,
|
|
109
112
|
"border-block-end-width": parseBorderSideWidthDeclaration,
|
|
110
113
|
"border-block-start": parseBorderBlockStart,
|
|
111
114
|
"border-block-start-color": parseColorDeclaration,
|
|
115
|
+
"border-block-start-style": parseBorderStyleDeclaration,
|
|
112
116
|
"border-block-start-width": parseBorderSideWidthDeclaration,
|
|
117
|
+
"border-block-style": parseBorderBlockStyle,
|
|
113
118
|
"border-block-width": parseBorderBlockWidth,
|
|
114
119
|
"border-bottom": parseBorderSide,
|
|
115
120
|
"border-bottom-color": parseColorDeclaration,
|
|
116
121
|
"border-bottom-left-radius": parseSize2DDimensionPercentageDeclaration,
|
|
117
122
|
"border-bottom-right-radius": parseSize2DDimensionPercentageDeclaration,
|
|
123
|
+
"border-bottom-style": parseBorderStyleDeclaration,
|
|
118
124
|
"border-bottom-width": parseBorderSideWidthDeclaration,
|
|
119
125
|
"border-color": parseBorderColor,
|
|
120
126
|
"border-end-end-radius": parseSize2DDimensionPercentageDeclaration,
|
|
121
127
|
"border-end-start-radius": parseSize2DDimensionPercentageDeclaration,
|
|
122
128
|
"border-inline": parseBorderInline,
|
|
123
|
-
"border-inline-color":
|
|
129
|
+
"border-inline-color": parseBorderColor,
|
|
124
130
|
"border-inline-end": parseBorderInlineEnd,
|
|
125
131
|
"border-inline-end-color": parseColorDeclaration,
|
|
132
|
+
"border-inline-end-style": parseBorderInlineStyle,
|
|
126
133
|
"border-inline-end-width": parseBorderSideWidthDeclaration,
|
|
127
134
|
"border-inline-start": parseBorderInlineStart,
|
|
128
135
|
"border-inline-start-color": parseColorDeclaration,
|
|
136
|
+
"border-inline-start-style": parseBorderInlineStyle,
|
|
129
137
|
"border-inline-start-width": parseBorderSideWidthDeclaration,
|
|
130
|
-
"border-inline-
|
|
138
|
+
"border-inline-style": parseBorderInlineStyle,
|
|
139
|
+
"border-inline-width": parseBorderInlineWidth,
|
|
131
140
|
"border-left": parseBorderSide,
|
|
132
141
|
"border-left-color": parseColorDeclaration,
|
|
142
|
+
"border-left-style": parseBorderStyleDeclaration,
|
|
133
143
|
"border-left-width": parseBorderSideWidthDeclaration,
|
|
134
144
|
"border-radius": parseBorderRadius,
|
|
135
145
|
"border-right": parseBorderSide,
|
|
136
146
|
"border-right-color": parseColorDeclaration,
|
|
147
|
+
"border-right-style": parseBorderStyleDeclaration,
|
|
137
148
|
"border-right-width": parseBorderSideWidthDeclaration,
|
|
138
149
|
"border-start-end-radius": parseSize2DDimensionPercentageDeclaration,
|
|
139
150
|
"border-start-start-radius": parseSize2DDimensionPercentageDeclaration,
|
|
@@ -142,11 +153,12 @@ const parsers = {
|
|
|
142
153
|
"border-top-color": parseColorDeclaration,
|
|
143
154
|
"border-top-left-radius": parseSize2DDimensionPercentageDeclaration,
|
|
144
155
|
"border-top-right-radius": parseSize2DDimensionPercentageDeclaration,
|
|
156
|
+
"border-top-style": parseBorderStyleDeclaration,
|
|
145
157
|
"border-top-width": parseBorderSideWidthDeclaration,
|
|
146
158
|
"border-width": parseBorderWidth,
|
|
147
159
|
"bottom": parseSizeDeclaration,
|
|
148
160
|
"box-shadow": parseBoxShadow,
|
|
149
|
-
"caret-color":
|
|
161
|
+
"caret-color": parseColorOrAutoDeclaration,
|
|
150
162
|
"color": parseFontColorDeclaration,
|
|
151
163
|
"column-gap": parseGap,
|
|
152
164
|
"container": parseContainer,
|
|
@@ -250,6 +262,7 @@ const parsers = {
|
|
|
250
262
|
"translate": parseTranslate,
|
|
251
263
|
"user-select": parseUserSelect,
|
|
252
264
|
"vertical-align": parseVerticalAlign,
|
|
265
|
+
"visibility": parseVisibility,
|
|
253
266
|
"width": parseSizeDeclaration,
|
|
254
267
|
"z-index": parseZIndex
|
|
255
268
|
};
|
|
@@ -265,9 +278,9 @@ function parseDeclaration(declaration, builder) {
|
|
|
265
278
|
return;
|
|
266
279
|
}
|
|
267
280
|
if (declaration.property === "unparsed") {
|
|
268
|
-
|
|
281
|
+
parseUnparsedDeclaration(declaration, builder);
|
|
269
282
|
} else if (declaration.property === "custom") {
|
|
270
|
-
|
|
283
|
+
parseCustomDeclaration(declaration, builder);
|
|
271
284
|
} else {
|
|
272
285
|
parseWithParser(declaration, builder);
|
|
273
286
|
}
|
|
@@ -276,6 +289,7 @@ function parseWithParser(declaration, builder) {
|
|
|
276
289
|
if (declaration.property in parsers) {
|
|
277
290
|
const parser = parsers[declaration.property];
|
|
278
291
|
builder.descriptorProperty = declaration.property;
|
|
292
|
+
builder.setWarningProperty(declaration.property);
|
|
279
293
|
const value = parser(declaration, builder, declaration.property);
|
|
280
294
|
if (value !== undefined) {
|
|
281
295
|
builder.addDescriptor(propertyRename[declaration.property] ?? declaration.property, value);
|
|
@@ -320,15 +334,25 @@ function parseBorderRadius({
|
|
|
320
334
|
"border-top-right-radius": parseSize2DDimensionPercentage(value.topRight, builder)
|
|
321
335
|
});
|
|
322
336
|
}
|
|
323
|
-
function parseBorderColor({
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
337
|
+
function parseBorderColor(declaration, builder) {
|
|
338
|
+
switch (declaration.property) {
|
|
339
|
+
case "border-color":
|
|
340
|
+
builder.addShorthand("border-color", {
|
|
341
|
+
"border-top-color": parseColor(declaration.value.top, builder),
|
|
342
|
+
"border-bottom-color": parseColor(declaration.value.bottom, builder),
|
|
343
|
+
"border-left-color": parseColor(declaration.value.left, builder),
|
|
344
|
+
"border-right-color": parseColor(declaration.value.right, builder)
|
|
345
|
+
});
|
|
346
|
+
break;
|
|
347
|
+
case "border-block-color":
|
|
348
|
+
builder.addDescriptor("border-top-color", parseColor(declaration.value.start, builder));
|
|
349
|
+
builder.addDescriptor("border-bottom-color", parseColor(declaration.value.end, builder));
|
|
350
|
+
break;
|
|
351
|
+
case "border-inline-color":
|
|
352
|
+
builder.addDescriptor("border-left-color", parseColor(declaration.value.start, builder));
|
|
353
|
+
builder.addDescriptor("border-right-color", parseColor(declaration.value.end, builder));
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
332
356
|
}
|
|
333
357
|
function parseBorderWidth({
|
|
334
358
|
value
|
|
@@ -359,42 +383,55 @@ function parseBorderSide({
|
|
|
359
383
|
function parseBorderBlock({
|
|
360
384
|
value
|
|
361
385
|
}, builder) {
|
|
362
|
-
builder.addDescriptor("border-
|
|
363
|
-
builder.addDescriptor("border-
|
|
364
|
-
builder.addDescriptor("border-
|
|
365
|
-
builder.addDescriptor("border-bottom-width", parseBorderSideWidth(value.width, builder));
|
|
386
|
+
builder.addDescriptor("border-block-color", parseColor(value.color, builder));
|
|
387
|
+
builder.addDescriptor("border-block-width", parseBorderSideWidth(value.width, builder));
|
|
388
|
+
builder.addDescriptor("border-block-style", parseBorderStyle(value.style, builder));
|
|
366
389
|
}
|
|
367
390
|
function parseBorderBlockStart({
|
|
368
391
|
value
|
|
369
392
|
}, builder) {
|
|
370
|
-
builder.addDescriptor("border-
|
|
371
|
-
builder.addDescriptor("border-
|
|
393
|
+
builder.addDescriptor("border-block-start-color", parseColor(value.color, builder));
|
|
394
|
+
builder.addDescriptor("border-block-start-width", parseBorderSideWidth(value.width, builder));
|
|
372
395
|
}
|
|
373
396
|
function parseBorderBlockEnd({
|
|
374
397
|
value
|
|
375
398
|
}, builder) {
|
|
376
|
-
builder.addDescriptor("border-
|
|
377
|
-
builder.addDescriptor("border-
|
|
399
|
+
builder.addDescriptor("border-block-end-color", parseColor(value.color, builder));
|
|
400
|
+
builder.addDescriptor("border-block-end-width", parseBorderSideWidth(value.width, builder));
|
|
378
401
|
}
|
|
379
402
|
function parseBorderInline({
|
|
380
403
|
value
|
|
381
404
|
}, builder) {
|
|
382
|
-
builder.addDescriptor("border-
|
|
383
|
-
builder.addDescriptor("border-
|
|
384
|
-
builder.addDescriptor("border-
|
|
385
|
-
builder.addDescriptor("border-right-width", parseBorderSideWidth(value.width, builder));
|
|
405
|
+
builder.addDescriptor("border-inline-color", parseColor(value.color, builder));
|
|
406
|
+
builder.addDescriptor("border-inline-width", parseBorderSideWidth(value.width, builder));
|
|
407
|
+
builder.addDescriptor("border-inline-style", parseBorderStyle(value.style, builder));
|
|
386
408
|
}
|
|
387
409
|
function parseBorderInlineStart({
|
|
388
410
|
value
|
|
389
411
|
}, builder) {
|
|
390
|
-
builder.addDescriptor("border-
|
|
391
|
-
builder.addDescriptor("border-
|
|
412
|
+
builder.addDescriptor("border-inline-start-color", parseColor(value.color, builder));
|
|
413
|
+
builder.addDescriptor("border-inline-start-width", parseBorderSideWidth(value.width, builder));
|
|
414
|
+
builder.addDescriptor("border-inline-start-style", parseBorderStyle(value.style, builder));
|
|
392
415
|
}
|
|
393
416
|
function parseBorderInlineEnd({
|
|
394
417
|
value
|
|
395
418
|
}, builder) {
|
|
396
|
-
builder.addDescriptor("border-
|
|
397
|
-
builder.addDescriptor("border-
|
|
419
|
+
builder.addDescriptor("border-inline-end-color", parseColor(value.color, builder));
|
|
420
|
+
builder.addDescriptor("border-inline-end-width", parseBorderSideWidth(value.width, builder));
|
|
421
|
+
builder.addDescriptor("border-inline-end-style", parseBorderStyle(value.style, builder));
|
|
422
|
+
}
|
|
423
|
+
function parseBorderInlineWidth(declaration, builder) {
|
|
424
|
+
builder.addDescriptor("border-inline-width", parseBorderSideWidth(declaration.value.start, builder));
|
|
425
|
+
}
|
|
426
|
+
function parseBorderInlineStyle(declaration, builder) {
|
|
427
|
+
if (typeof declaration.value === "string") {
|
|
428
|
+
builder.addDescriptor(declaration.property, parseBorderStyle(declaration.value, builder));
|
|
429
|
+
} else if (declaration.value.start === declaration.value.end) {
|
|
430
|
+
builder.addDescriptor(declaration.property, parseBorderStyle(declaration.value.start, builder));
|
|
431
|
+
} else {
|
|
432
|
+
builder.addDescriptor("border-inline-start-style", parseBorderStyle(declaration.value.start, builder));
|
|
433
|
+
builder.addDescriptor("border-inline-end-style", parseBorderStyle(declaration.value.end, builder));
|
|
434
|
+
}
|
|
398
435
|
}
|
|
399
436
|
function parseFlexFlow({
|
|
400
437
|
value
|
|
@@ -482,26 +519,26 @@ function parseFont({
|
|
|
482
519
|
function parseTransform({
|
|
483
520
|
value
|
|
484
521
|
}, builder) {
|
|
485
|
-
builder.addDescriptor("transform", [{}, "
|
|
522
|
+
builder.addDescriptor("transform", [{}, "transform", value.flatMap(t => {
|
|
486
523
|
switch (t.type) {
|
|
487
524
|
case "perspective":
|
|
488
|
-
return [[{}, "
|
|
525
|
+
return [[{}, "perspective", parseLength(t.value, builder)]];
|
|
489
526
|
case "translate":
|
|
490
|
-
return [[{}, "
|
|
527
|
+
return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value[0], builder)], [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value[1], builder)]]];
|
|
491
528
|
case "translateX":
|
|
492
|
-
return [[{}, "
|
|
529
|
+
return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
|
|
493
530
|
case "translateY":
|
|
494
|
-
return [[{}, "
|
|
531
|
+
return [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
|
|
495
532
|
case "rotate":
|
|
496
|
-
return [[{}, "
|
|
533
|
+
return [[{}, "rotate", parseAngle(t.value, builder)]];
|
|
497
534
|
case "rotateX":
|
|
498
|
-
return [[{}, "
|
|
535
|
+
return [[{}, "rotateX", parseAngle(t.value, builder)]];
|
|
499
536
|
case "rotateY":
|
|
500
|
-
return [[{}, "
|
|
537
|
+
return [[{}, "rotateY", parseAngle(t.value, builder)]];
|
|
501
538
|
case "rotateZ":
|
|
502
|
-
return [[{}, "
|
|
539
|
+
return [[{}, "rotateZ", parseAngle(t.value, builder)]];
|
|
503
540
|
case "scale":
|
|
504
|
-
return [[{}, "
|
|
541
|
+
return [[{}, "scaleX", parseLength(t.value[0], builder)], [{}, "scaleY", parseLength(t.value[1], builder)]];
|
|
505
542
|
case "scaleX":
|
|
506
543
|
return [[{}, "scaleX", parseLength(t.value, builder)]];
|
|
507
544
|
case "scaleY":
|
|
@@ -533,9 +570,15 @@ function parseTranslate({
|
|
|
533
570
|
function parseRotate({
|
|
534
571
|
value
|
|
535
572
|
}, builder) {
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
573
|
+
if (value.x) {
|
|
574
|
+
builder.addDescriptor("rotateX", [{}, "rotateX", parseAngle(value.angle, builder)]);
|
|
575
|
+
}
|
|
576
|
+
if (value.y) {
|
|
577
|
+
builder.addDescriptor("rotateY", [{}, "rotateY", parseAngle(value.angle, builder)]);
|
|
578
|
+
}
|
|
579
|
+
if (value.z) {
|
|
580
|
+
builder.addDescriptor("rotateZ", [{}, "rotateZ", parseAngle(value.angle, builder)]);
|
|
581
|
+
}
|
|
539
582
|
}
|
|
540
583
|
function parseScale({
|
|
541
584
|
value
|
|
@@ -555,7 +598,11 @@ function parseLetterSpacing({
|
|
|
555
598
|
if (value.type === "normal") {
|
|
556
599
|
return;
|
|
557
600
|
}
|
|
558
|
-
|
|
601
|
+
const descriptor = parseLength(value.value, builder);
|
|
602
|
+
if (Array.isArray(descriptor) && descriptor[1] === "em" && typeof descriptor[2] === "number") {
|
|
603
|
+
return descriptor[2];
|
|
604
|
+
}
|
|
605
|
+
return descriptor;
|
|
559
606
|
}
|
|
560
607
|
function parseTextDecoration({
|
|
561
608
|
value
|
|
@@ -573,7 +620,8 @@ function parseZIndex({
|
|
|
573
620
|
return;
|
|
574
621
|
}
|
|
575
622
|
}
|
|
576
|
-
function parseContainerType(
|
|
623
|
+
function parseContainerType(_declaration, builder) {
|
|
624
|
+
builder.addContainer(["___default___"]);
|
|
577
625
|
return;
|
|
578
626
|
}
|
|
579
627
|
function parseContainerName({
|
|
@@ -588,12 +636,13 @@ function parseContainer({
|
|
|
588
636
|
builder.addContainer(value.name.type === "none" ? false : value.name.value);
|
|
589
637
|
return;
|
|
590
638
|
}
|
|
591
|
-
function
|
|
639
|
+
function parseUnparsedDeclaration(declaration, builder) {
|
|
592
640
|
let property = declaration.value.propertyId.property;
|
|
593
641
|
if (!(property in parsers)) {
|
|
594
642
|
builder.addWarning("property", property);
|
|
595
643
|
return;
|
|
596
644
|
}
|
|
645
|
+
builder.setWarningProperty(property);
|
|
597
646
|
|
|
598
647
|
/**
|
|
599
648
|
* React Native doesn't support all the logical properties
|
|
@@ -608,14 +657,14 @@ function parseDeclarationUnparsed(declaration, builder) {
|
|
|
608
657
|
*/
|
|
609
658
|
builder.descriptorProperty = property;
|
|
610
659
|
if (unparsedRuntimeParsing.has(property)) {
|
|
611
|
-
const args = parseUnparsed(declaration.value.value, builder);
|
|
660
|
+
const args = parseUnparsed(declaration.value.value, builder, property);
|
|
612
661
|
if (property === "animation") {
|
|
613
|
-
builder.addDescriptor("animation", [{},
|
|
662
|
+
builder.addDescriptor("animation", [{}, property, args]);
|
|
614
663
|
} else {
|
|
615
|
-
builder.addDescriptor(property, [{},
|
|
664
|
+
builder.addDescriptor(property, [{}, (0, _selectors.toRNProperty)(property), args, 1]);
|
|
616
665
|
}
|
|
617
666
|
} else {
|
|
618
|
-
const value = parseUnparsed(declaration.value.value, builder);
|
|
667
|
+
const value = parseUnparsed(declaration.value.value, builder, property);
|
|
619
668
|
builder.addDescriptor(property, value);
|
|
620
669
|
if (property === "font-size") {
|
|
621
670
|
builder.addDescriptor("--__rn-css-em", value);
|
|
@@ -625,16 +674,26 @@ function parseDeclarationUnparsed(declaration, builder) {
|
|
|
625
674
|
}
|
|
626
675
|
}
|
|
627
676
|
}
|
|
628
|
-
function
|
|
677
|
+
function parseCustomDeclaration(declaration, builder) {
|
|
629
678
|
const property = declaration.value.name;
|
|
630
|
-
if (
|
|
631
|
-
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder,
|
|
679
|
+
if (property === "-webkit-line-clamp") {
|
|
680
|
+
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
681
|
+
} else if (property === "-rn-ripple-style") {
|
|
682
|
+
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property) === "borderless");
|
|
683
|
+
} else if (property === "object-fit") {
|
|
684
|
+
// https://github.com/parcel-bundler/lightningcss/issues/1046
|
|
685
|
+
parseObjectFit(declaration.value, builder);
|
|
686
|
+
} else if (property === "object-position") {
|
|
687
|
+
// https://github.com/parcel-bundler/lightningcss/issues/1047
|
|
688
|
+
parseObjectPosition(declaration.value, builder);
|
|
689
|
+
} else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
|
|
690
|
+
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
632
691
|
} else {
|
|
633
692
|
builder.addWarning("property", declaration.value.name);
|
|
634
693
|
}
|
|
635
694
|
}
|
|
636
|
-
function reduceParseUnparsed(tokenOrValues, builder) {
|
|
637
|
-
const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder)).filter(v => v !== undefined);
|
|
695
|
+
function reduceParseUnparsed(tokenOrValues, builder, property, allowAuto) {
|
|
696
|
+
const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder, property, allowAuto)).filter(v => v !== undefined);
|
|
638
697
|
if (result.length === 0) {
|
|
639
698
|
return undefined;
|
|
640
699
|
}
|
|
@@ -648,6 +707,9 @@ function reduceParseUnparsed(tokenOrValues, builder) {
|
|
|
648
707
|
currentGroup.push(value);
|
|
649
708
|
}
|
|
650
709
|
}
|
|
710
|
+
|
|
711
|
+
// Groups are the tokens grouped together by comma location
|
|
712
|
+
// If a group only has 1 item, it shouldn't be an array
|
|
651
713
|
groups = groups.flatMap(group => {
|
|
652
714
|
if (!Array.isArray(group)) {
|
|
653
715
|
return [];
|
|
@@ -661,21 +723,26 @@ function reduceParseUnparsed(tokenOrValues, builder) {
|
|
|
661
723
|
} else {
|
|
662
724
|
return [first];
|
|
663
725
|
}
|
|
726
|
+
} else if (
|
|
727
|
+
// This is a special case for <ratio> values
|
|
728
|
+
group.includes("/") && group.every(item => typeof item === "string" && item === "/" ? item : typeof item === "number")) {
|
|
729
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
730
|
+
return [group.join(" ")];
|
|
664
731
|
} else {
|
|
665
732
|
return [group];
|
|
666
733
|
}
|
|
667
734
|
});
|
|
668
735
|
return groups.length === 1 ? groups[0] : groups;
|
|
669
736
|
}
|
|
670
|
-
function unparsedFunction(token, builder) {
|
|
671
|
-
return [{}, token.value.name, reduceParseUnparsed(token.value.arguments, builder)];
|
|
737
|
+
function unparsedFunction(token, builder, property, allowAuto) {
|
|
738
|
+
return [{}, (0, _selectors.toRNProperty)(token.value.name), reduceParseUnparsed(token.value.arguments, builder, property, allowAuto)];
|
|
672
739
|
}
|
|
673
740
|
|
|
674
741
|
/**
|
|
675
742
|
* When the CSS cannot be parsed (often due to a runtime condition like a CSS variable)
|
|
676
743
|
* This export function best efforts parsing it into a export function that we can evaluate at runtime
|
|
677
744
|
*/
|
|
678
|
-
function parseUnparsed(tokenOrValue, builder, allowAuto =
|
|
745
|
+
function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoProperties.has(property)) {
|
|
679
746
|
if (tokenOrValue === undefined || tokenOrValue === null) {
|
|
680
747
|
return;
|
|
681
748
|
}
|
|
@@ -694,7 +761,7 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
694
761
|
return round(tokenOrValue);
|
|
695
762
|
}
|
|
696
763
|
if (Array.isArray(tokenOrValue)) {
|
|
697
|
-
const args = reduceParseUnparsed(tokenOrValue, builder);
|
|
764
|
+
const args = reduceParseUnparsed(tokenOrValue, builder, property, allowAuto);
|
|
698
765
|
if (!args) return;
|
|
699
766
|
if (Array.isArray(args) && args.length === 1) return args[0];
|
|
700
767
|
return args;
|
|
@@ -702,12 +769,12 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
702
769
|
switch (tokenOrValue.type) {
|
|
703
770
|
case "unresolved-color":
|
|
704
771
|
{
|
|
705
|
-
return parseUnresolvedColor(tokenOrValue.value, builder);
|
|
772
|
+
return parseUnresolvedColor(tokenOrValue.value, builder, property, allowAuto);
|
|
706
773
|
}
|
|
707
774
|
case "var":
|
|
708
775
|
{
|
|
709
776
|
let args = tokenOrValue.value.name.ident.slice(2);
|
|
710
|
-
const fallback = parseUnparsed(tokenOrValue.value.fallback, builder);
|
|
777
|
+
const fallback = parseUnparsed(tokenOrValue.value.fallback, builder, property, allowAuto);
|
|
711
778
|
if (fallback !== undefined) {
|
|
712
779
|
args = [args, fallback];
|
|
713
780
|
}
|
|
@@ -716,53 +783,54 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
716
783
|
case "function":
|
|
717
784
|
{
|
|
718
785
|
switch (tokenOrValue.value.name) {
|
|
719
|
-
case "
|
|
720
|
-
case "rotate":
|
|
721
|
-
case "rotateX":
|
|
722
|
-
case "rotateY":
|
|
723
|
-
case "skewX":
|
|
724
|
-
case "skewY":
|
|
725
|
-
case "scale":
|
|
726
|
-
case "scaleX":
|
|
727
|
-
case "scaleY":
|
|
728
|
-
case "translateX":
|
|
729
|
-
case "translateY":
|
|
730
|
-
tokenOrValue.value.name = `@${tokenOrValue.value.name}`;
|
|
731
|
-
return unparsedFunction(tokenOrValue, builder);
|
|
786
|
+
case "blur":
|
|
732
787
|
case "brightness":
|
|
733
788
|
case "contrast":
|
|
734
789
|
case "cubic-bezier":
|
|
735
790
|
case "drop-shadow":
|
|
736
791
|
case "fontScale":
|
|
792
|
+
case "getPixelSizeForLayoutSize":
|
|
737
793
|
case "grayscale":
|
|
738
794
|
case "hsl":
|
|
739
795
|
case "hsla":
|
|
740
796
|
case "hue-rotate":
|
|
741
797
|
case "invert":
|
|
742
|
-
case "linear-gradient":
|
|
743
798
|
case "opacity":
|
|
744
799
|
case "pixelScale":
|
|
745
|
-
case "pixelSizeForLayoutSize":
|
|
746
800
|
case "platformColor":
|
|
747
|
-
case "radial-gradient":
|
|
748
801
|
case "rgb":
|
|
749
802
|
case "rgba":
|
|
803
|
+
case "rotate":
|
|
804
|
+
case "rotateX":
|
|
805
|
+
case "rotateY":
|
|
750
806
|
case "roundToNearestPixel":
|
|
751
807
|
case "saturate":
|
|
808
|
+
case "scale":
|
|
809
|
+
case "scaleX":
|
|
810
|
+
case "scaleY":
|
|
752
811
|
case "sepia":
|
|
753
812
|
case "shadow":
|
|
813
|
+
case "skewX":
|
|
814
|
+
case "skewY":
|
|
754
815
|
case "steps":
|
|
755
|
-
|
|
816
|
+
case "translate":
|
|
817
|
+
case "translateX":
|
|
818
|
+
case "translateY":
|
|
819
|
+
return unparsedFunction(tokenOrValue, builder, property, allowAuto);
|
|
820
|
+
case "linear-gradient":
|
|
821
|
+
case "radial-gradient":
|
|
822
|
+
// These are special as React Native requires the '-' in their name
|
|
823
|
+
return [{}, tokenOrValue.value.name, reduceParseUnparsed(tokenOrValue.value.arguments, builder, property, allowAuto)];
|
|
756
824
|
case "hairlineWidth":
|
|
757
825
|
return [{}, tokenOrValue.value.name, []];
|
|
758
826
|
case "calc":
|
|
759
827
|
case "max":
|
|
760
828
|
case "min":
|
|
761
829
|
case "clamp":
|
|
762
|
-
return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder);
|
|
830
|
+
return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder, property);
|
|
763
831
|
default:
|
|
764
832
|
{
|
|
765
|
-
builder.addWarning("
|
|
833
|
+
builder.addWarning("value", `${tokenOrValue.value.name}()`);
|
|
766
834
|
return;
|
|
767
835
|
}
|
|
768
836
|
}
|
|
@@ -781,7 +849,7 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
781
849
|
builder.addWarning("value", value);
|
|
782
850
|
return;
|
|
783
851
|
}
|
|
784
|
-
if (value === "inherit") {
|
|
852
|
+
if (value === "inherit" || value === "initial") {
|
|
785
853
|
builder.addWarning("value", value);
|
|
786
854
|
return;
|
|
787
855
|
} else if (value === "currentcolor") {
|
|
@@ -791,6 +859,8 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
791
859
|
return true;
|
|
792
860
|
} else if (value === "false") {
|
|
793
861
|
return false;
|
|
862
|
+
} else if (value === "infinity") {
|
|
863
|
+
return Number.MAX_SAFE_INTEGER;
|
|
794
864
|
} else {
|
|
795
865
|
return value;
|
|
796
866
|
}
|
|
@@ -808,11 +878,17 @@ function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
808
878
|
return parseDimension(tokenOrValue.value, builder);
|
|
809
879
|
case "comma":
|
|
810
880
|
return CommaSeparator;
|
|
881
|
+
case "delim":
|
|
882
|
+
{
|
|
883
|
+
if (tokenOrValue.value.value === "/") {
|
|
884
|
+
return tokenOrValue.value.value;
|
|
885
|
+
}
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
811
888
|
case "at-keyword":
|
|
812
889
|
case "hash":
|
|
813
890
|
case "id-hash":
|
|
814
891
|
case "unquoted-url":
|
|
815
|
-
case "delim":
|
|
816
892
|
case "white-space":
|
|
817
893
|
case "comment":
|
|
818
894
|
case "colon":
|
|
@@ -865,22 +941,32 @@ function parseLength(length, builder) {
|
|
|
865
941
|
inlineRem = 14
|
|
866
942
|
} = builder.getOptions();
|
|
867
943
|
if (typeof length === "number") {
|
|
868
|
-
return length;
|
|
944
|
+
return round(length);
|
|
869
945
|
}
|
|
870
946
|
if ("unit" in length) {
|
|
871
947
|
switch (length.unit) {
|
|
872
948
|
case "px":
|
|
873
|
-
|
|
949
|
+
{
|
|
950
|
+
if (length.value === Infinity) {
|
|
951
|
+
return 9999;
|
|
952
|
+
} else if (length.value === -Infinity) {
|
|
953
|
+
return -9999;
|
|
954
|
+
} else {
|
|
955
|
+
// Normalize large values to safe integers, e.g. `calc(infinity * 1px)`
|
|
956
|
+
const value = Math.max(Math.min(length.value, Number.MAX_SAFE_INTEGER), Number.MIN_SAFE_INTEGER);
|
|
957
|
+
return round(value);
|
|
958
|
+
}
|
|
959
|
+
}
|
|
874
960
|
case "rem":
|
|
875
961
|
if (typeof inlineRem === "number") {
|
|
876
962
|
return length.value * inlineRem;
|
|
877
963
|
} else {
|
|
878
|
-
return [{}, "rem", length.value];
|
|
964
|
+
return [{}, "rem", round(length.value)];
|
|
879
965
|
}
|
|
880
966
|
case "vw":
|
|
881
967
|
case "vh":
|
|
882
968
|
case "em":
|
|
883
|
-
return [{}, length.unit, length.value, 1];
|
|
969
|
+
return [{}, length.unit, round(length.value), 1];
|
|
884
970
|
case "in":
|
|
885
971
|
case "cm":
|
|
886
972
|
case "mm":
|
|
@@ -965,7 +1051,7 @@ function parseAngle(angle, builder) {
|
|
|
965
1051
|
case "rad":
|
|
966
1052
|
return `${angle.value}${angle.type}`;
|
|
967
1053
|
default:
|
|
968
|
-
builder.addWarning("value", angle.value);
|
|
1054
|
+
builder.addWarning("value", `${angle.value} ${angle.type}`);
|
|
969
1055
|
return undefined;
|
|
970
1056
|
}
|
|
971
1057
|
}
|
|
@@ -1023,7 +1109,7 @@ function parseSize(size, builder, options, {
|
|
|
1023
1109
|
}
|
|
1024
1110
|
return;
|
|
1025
1111
|
}
|
|
1026
|
-
function
|
|
1112
|
+
function parseColorOrAutoDeclaration({
|
|
1027
1113
|
value
|
|
1028
1114
|
}, builder) {
|
|
1029
1115
|
if (value.type === "auto") {
|
|
@@ -1413,19 +1499,28 @@ function parseBorderStyle(value, builder) {
|
|
|
1413
1499
|
builder.addWarning("value", value.top);
|
|
1414
1500
|
return undefined;
|
|
1415
1501
|
}
|
|
1416
|
-
function parseBorderBlockColor({
|
|
1417
|
-
value
|
|
1418
|
-
}, builder) {
|
|
1419
|
-
builder.addDescriptor("border-top-color", parseColor(value.start, builder));
|
|
1420
|
-
builder.addDescriptor("border-bottom-color", parseColor(value.end, builder));
|
|
1421
|
-
return;
|
|
1422
|
-
}
|
|
1423
1502
|
function parseBorderBlockWidth(declaration, builder) {
|
|
1424
|
-
|
|
1425
|
-
|
|
1503
|
+
const start = parseBorderSideWidth(declaration.value.start, builder);
|
|
1504
|
+
const end = parseBorderSideWidth(declaration.value.end, builder);
|
|
1505
|
+
if (start === end) {
|
|
1506
|
+
builder.addDescriptor("border-block-width", start);
|
|
1507
|
+
} else {
|
|
1508
|
+
builder.addDescriptor("border-block-start-width", start);
|
|
1509
|
+
builder.addDescriptor("border-block-end-width", end);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
function parseBorderBlockStyle(declaration, builder) {
|
|
1513
|
+
const start = parseBorderStyle(declaration.value.start, builder);
|
|
1514
|
+
const end = parseBorderStyle(declaration.value.end, builder);
|
|
1515
|
+
if (start == end) {
|
|
1516
|
+
builder.addDescriptor("border-block-style", start);
|
|
1517
|
+
} else {
|
|
1518
|
+
builder.addDescriptor("border-block-start-style", start);
|
|
1519
|
+
builder.addDescriptor("border-block-end-style", end);
|
|
1520
|
+
}
|
|
1426
1521
|
}
|
|
1427
1522
|
function parseBorderSideWidthDeclaration(declaration, builder) {
|
|
1428
|
-
|
|
1523
|
+
builder.addDescriptor(declaration.property, parseBorderSideWidth(declaration.value, builder));
|
|
1429
1524
|
}
|
|
1430
1525
|
function parseBorderSideWidth(value, builder) {
|
|
1431
1526
|
if (value.type === "length") {
|
|
@@ -1470,7 +1565,7 @@ function parseLineHeight(value, builder) {
|
|
|
1470
1565
|
return parseLength(length, builder);
|
|
1471
1566
|
case "percentage":
|
|
1472
1567
|
case "calc":
|
|
1473
|
-
builder.addWarning("
|
|
1568
|
+
builder.addWarning("style", "line-height", typeof length.value === "number" ? length.value : JSON.stringify(length.value));
|
|
1474
1569
|
return;
|
|
1475
1570
|
default:
|
|
1476
1571
|
{
|
|
@@ -1657,7 +1752,11 @@ function parseDimension({
|
|
|
1657
1752
|
}, builder) {
|
|
1658
1753
|
switch (unit) {
|
|
1659
1754
|
case "px":
|
|
1660
|
-
|
|
1755
|
+
if (value === Infinity) {
|
|
1756
|
+
return 9999;
|
|
1757
|
+
} else {
|
|
1758
|
+
return value;
|
|
1759
|
+
}
|
|
1661
1760
|
case "%":
|
|
1662
1761
|
return `${value}%`;
|
|
1663
1762
|
case "rnh":
|
|
@@ -1682,17 +1781,21 @@ function parseUserSelect({
|
|
|
1682
1781
|
}
|
|
1683
1782
|
}
|
|
1684
1783
|
function parseSVGPaint({
|
|
1685
|
-
value
|
|
1784
|
+
value,
|
|
1785
|
+
property
|
|
1686
1786
|
}, builder) {
|
|
1787
|
+
let parsedValue;
|
|
1687
1788
|
if (value.type === "none") {
|
|
1688
|
-
|
|
1789
|
+
parsedValue = "transparent";
|
|
1689
1790
|
} else if (value.type === "color") {
|
|
1690
|
-
|
|
1791
|
+
parsedValue = parseColor(value.value, builder);
|
|
1792
|
+
} else {
|
|
1793
|
+
return;
|
|
1691
1794
|
}
|
|
1692
|
-
|
|
1795
|
+
builder.addDescriptor(property, parsedValue);
|
|
1693
1796
|
}
|
|
1694
1797
|
function round(number) {
|
|
1695
|
-
return Math.round((number + Number.EPSILON) *
|
|
1798
|
+
return Math.round((number + Number.EPSILON) * 10000) / 10000;
|
|
1696
1799
|
}
|
|
1697
1800
|
function parseDimensionPercentageFor_LengthValue(value, builder) {
|
|
1698
1801
|
if (value.type === "calc") {
|
|
@@ -1703,7 +1806,7 @@ function parseDimensionPercentageFor_LengthValue(value, builder) {
|
|
|
1703
1806
|
return parseLength(value.value, builder);
|
|
1704
1807
|
}
|
|
1705
1808
|
}
|
|
1706
|
-
const
|
|
1809
|
+
const allowAutoProperties = new Set(["pointer-events"]);
|
|
1707
1810
|
function parseEnv(value, builder) {
|
|
1708
1811
|
switch (value.name.type) {
|
|
1709
1812
|
case "ua":
|
|
@@ -1712,7 +1815,7 @@ function parseEnv(value, builder) {
|
|
|
1712
1815
|
case "safe-area-inset-right":
|
|
1713
1816
|
case "safe-area-inset-bottom":
|
|
1714
1817
|
case "safe-area-inset-left":
|
|
1715
|
-
return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder)], 1];
|
|
1818
|
+
return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder, value.name.value)], 1];
|
|
1716
1819
|
case "viewport-segment-width":
|
|
1717
1820
|
case "viewport-segment-height":
|
|
1718
1821
|
case "viewport-segment-top":
|
|
@@ -1726,17 +1829,16 @@ function parseEnv(value, builder) {
|
|
|
1726
1829
|
}
|
|
1727
1830
|
return;
|
|
1728
1831
|
}
|
|
1729
|
-
function parseCalcFn(name, tokens, builder) {
|
|
1730
|
-
const args = parseCalcArguments(tokens, builder);
|
|
1832
|
+
function parseCalcFn(name, tokens, builder, property) {
|
|
1833
|
+
const args = parseCalcArguments(tokens, builder, property);
|
|
1731
1834
|
if (args) {
|
|
1732
1835
|
return [{}, name, args];
|
|
1733
1836
|
}
|
|
1734
1837
|
return;
|
|
1735
1838
|
}
|
|
1736
|
-
function parseCalcArguments([...args], builder) {
|
|
1839
|
+
function parseCalcArguments([...args], builder, property) {
|
|
1737
1840
|
const parsed = [];
|
|
1738
|
-
|
|
1739
|
-
for (const [currentIndex, arg] of args.entries()) {
|
|
1841
|
+
for (const arg of args) {
|
|
1740
1842
|
switch (arg.type) {
|
|
1741
1843
|
case "env":
|
|
1742
1844
|
{
|
|
@@ -1747,7 +1849,7 @@ function parseCalcArguments([...args], builder) {
|
|
|
1747
1849
|
case "function":
|
|
1748
1850
|
case "unresolved-color":
|
|
1749
1851
|
{
|
|
1750
|
-
const value = parseUnparsed(arg, builder);
|
|
1852
|
+
const value = parseUnparsed(arg, builder, property);
|
|
1751
1853
|
if (value === undefined) {
|
|
1752
1854
|
return undefined;
|
|
1753
1855
|
}
|
|
@@ -1782,44 +1884,21 @@ function parseCalcArguments([...args], builder) {
|
|
|
1782
1884
|
}
|
|
1783
1885
|
break;
|
|
1784
1886
|
case "percentage":
|
|
1785
|
-
|
|
1786
|
-
if (mode !== "percentage") return;
|
|
1787
|
-
parsed.push(`${arg.value.value * 100}%`);
|
|
1887
|
+
parsed.push(`${round(arg.value.value * 100)}%`);
|
|
1788
1888
|
break;
|
|
1789
1889
|
case "number":
|
|
1790
1890
|
{
|
|
1791
|
-
|
|
1792
|
-
if (mode !== "number") return;
|
|
1793
|
-
parsed.push(arg.value.value);
|
|
1891
|
+
parsed.push(round(arg.value.value));
|
|
1794
1892
|
break;
|
|
1795
1893
|
}
|
|
1796
1894
|
case "parenthesis-block":
|
|
1797
1895
|
{
|
|
1798
|
-
|
|
1799
|
-
* If we have a parenthesis block, we just treat it as a nested calc function
|
|
1800
|
-
* Because there could be multiple parenthesis blocks, this is recursive
|
|
1801
|
-
*/
|
|
1802
|
-
let closeParenthesisIndex = -1;
|
|
1803
|
-
for (let index = args.length - 1; index > 0; index--) {
|
|
1804
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1805
|
-
const value = args[index];
|
|
1806
|
-
if (value.type === "token" && value.value.type === "close-parenthesis") {
|
|
1807
|
-
closeParenthesisIndex = index;
|
|
1808
|
-
break;
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
if (closeParenthesisIndex === -1) {
|
|
1812
|
-
return;
|
|
1813
|
-
}
|
|
1814
|
-
const innerCalcArgs = args
|
|
1815
|
-
// Extract the inner calcArgs including the parenthesis. This mutates args
|
|
1816
|
-
.splice(currentIndex, closeParenthesisIndex - currentIndex + 1)
|
|
1817
|
-
// Then drop the surrounding parenthesis
|
|
1818
|
-
.slice(1, -1);
|
|
1819
|
-
parsed.push(parseCalcFn("calc", innerCalcArgs, builder));
|
|
1896
|
+
parsed.push("(");
|
|
1820
1897
|
break;
|
|
1821
1898
|
}
|
|
1822
1899
|
case "close-parenthesis":
|
|
1900
|
+
parsed.push(")");
|
|
1901
|
+
break;
|
|
1823
1902
|
case "string":
|
|
1824
1903
|
case "function":
|
|
1825
1904
|
case "ident":
|
|
@@ -1857,20 +1936,20 @@ function parseTranslateProp(value, prop, builder) {
|
|
|
1857
1936
|
}
|
|
1858
1937
|
return parseLength(value[prop], builder);
|
|
1859
1938
|
}
|
|
1860
|
-
function parseUnresolvedColor(color, builder) {
|
|
1939
|
+
function parseUnresolvedColor(color, builder, property, allowAuto) {
|
|
1861
1940
|
switch (color.type) {
|
|
1862
1941
|
case "rgb":
|
|
1863
|
-
return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder)]];
|
|
1942
|
+
return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder, property)]];
|
|
1864
1943
|
case "hsl":
|
|
1865
|
-
return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder)]];
|
|
1944
|
+
return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder, property)]];
|
|
1866
1945
|
case "light-dark":
|
|
1867
1946
|
{
|
|
1868
1947
|
const extraRule = builder.extendRule({
|
|
1869
1948
|
m: [["=", "prefers-color-scheme", "dark"]]
|
|
1870
1949
|
});
|
|
1871
|
-
builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder), false, extraRule);
|
|
1950
|
+
builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder, property, allowAuto), false, extraRule);
|
|
1872
1951
|
builder.addExtraRule(extraRule);
|
|
1873
|
-
return reduceParseUnparsed(color.light, builder);
|
|
1952
|
+
return reduceParseUnparsed(color.light, builder, property, allowAuto);
|
|
1874
1953
|
}
|
|
1875
1954
|
default:
|
|
1876
1955
|
color;
|
|
@@ -1932,7 +2011,7 @@ function addTransitionValue(declaration, builder) {
|
|
|
1932
2011
|
}
|
|
1933
2012
|
case "transition-property":
|
|
1934
2013
|
{
|
|
1935
|
-
builder.addDescriptor(declaration.property, declaration.value.map(v => v.property).filter(v => v in parsers || v === "all" || v === "none").map(v => (0, _selectors.toRNProperty)(v)));
|
|
2014
|
+
builder.addDescriptor(declaration.property, declaration.value.map(v => v.property).filter(v => v in parsers && !["visibility"].includes(v) || v === "all" || v === "none").map(v => (0, _selectors.toRNProperty)(v)));
|
|
1936
2015
|
return;
|
|
1937
2016
|
}
|
|
1938
2017
|
case "transition-duration":
|
|
@@ -2029,7 +2108,7 @@ function parseGradient(gradient, builder) {
|
|
|
2029
2108
|
switch (gradient.type) {
|
|
2030
2109
|
case "linear":
|
|
2031
2110
|
{
|
|
2032
|
-
return [{}, "
|
|
2111
|
+
return [{}, "linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
|
|
2033
2112
|
}
|
|
2034
2113
|
}
|
|
2035
2114
|
return;
|
|
@@ -2064,6 +2143,27 @@ function parseGradientItem(item, builder) {
|
|
|
2064
2143
|
return parseLength(item.value, builder);
|
|
2065
2144
|
}
|
|
2066
2145
|
}
|
|
2146
|
+
function parseObjectFit(declaration, builder) {
|
|
2147
|
+
builder.addMapping({
|
|
2148
|
+
"object-fit": "contentFit"
|
|
2149
|
+
});
|
|
2150
|
+
builder.addDescriptor("object-fit", parseUnparsed(declaration.value, builder, "object-fit"));
|
|
2151
|
+
}
|
|
2152
|
+
function parseObjectPosition(declaration, builder) {
|
|
2153
|
+
builder.addMapping({
|
|
2154
|
+
"object-position": "contentPosition"
|
|
2155
|
+
});
|
|
2156
|
+
builder.addDescriptor("object-position", [{}, "join", [parseUnparsed(declaration.value, builder, "object-position"), " "]]);
|
|
2157
|
+
}
|
|
2158
|
+
function parseVisibility(declaration, builder) {
|
|
2159
|
+
if (declaration.value === "visible") {
|
|
2160
|
+
builder.addDescriptor("opacity", 1);
|
|
2161
|
+
} else if (declaration.value === "hidden") {
|
|
2162
|
+
builder.addDescriptor("opacity", 0);
|
|
2163
|
+
} else {
|
|
2164
|
+
builder.addWarning("value", declaration.value);
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2067
2167
|
function parseFilter(declaration, builder) {
|
|
2068
2168
|
if (declaration.value.type === "none") {
|
|
2069
2169
|
return "unset";
|
|
@@ -2086,6 +2186,7 @@ function parseFilter(declaration, builder) {
|
|
|
2086
2186
|
[value.type]: parseAngle(value.value, builder)
|
|
2087
2187
|
};
|
|
2088
2188
|
case "drop-shadow":
|
|
2189
|
+
return [{}, (0, _selectors.toRNProperty)(value.type), [parseLength(value.value.xOffset, builder), parseLength(value.value.yOffset, builder), parseLength(value.value.blur, builder), parseColor(value.value.color, builder)]];
|
|
2089
2190
|
case "url":
|
|
2090
2191
|
return;
|
|
2091
2192
|
}
|