react-native-css 3.0.0-nightly.26b272f → 3.0.0-nightly.46bc0ab
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 +15 -2
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +103 -80
- package/dist/commonjs/compiler/declarations.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/stylesheet.js +14 -8
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- 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/TextInput.js +17 -0
- package/dist/commonjs/components/TextInput.js.map +1 -0
- package/dist/commonjs/components/index.js +40 -0
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/jest/index.js +21 -14
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/runtime/native/conditions/media-query.js +2 -0
- package/dist/commonjs/runtime/native/conditions/media-query.js.map +1 -1
- package/dist/commonjs/runtime/native/injection.js +19 -18
- package/dist/commonjs/runtime/native/injection.js.map +1 -1
- package/dist/commonjs/runtime/native/react/rules.js +13 -8
- package/dist/commonjs/runtime/native/react/rules.js.map +1 -1
- package/dist/commonjs/runtime/native/react/useNativeCss.js +2 -2
- package/dist/commonjs/runtime/native/react/useNativeCss.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 +5 -2
- 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/{calc.js → functions/calc.js} +1 -1
- 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 +61 -0
- package/dist/commonjs/runtime/native/styles/functions/index.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/transform-functions.js +83 -0
- package/dist/commonjs/runtime/native/styles/functions/transform-functions.js.map +1 -0
- 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} +5 -36
- 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/{box-shadow.js → shorthands/box-shadow.js} +3 -3
- 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/shorthands/transform.js.map +1 -0
- package/dist/commonjs/runtime/native/styles/units.js +1 -1
- package/dist/commonjs/runtime/native/styles/units.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/module/compiler/atRules.js +15 -2
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.types.js.map +1 -1
- package/dist/module/compiler/declarations.js +100 -77
- package/dist/module/compiler/declarations.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/stylesheet.js +14 -8
- package/dist/module/compiler/stylesheet.js.map +1 -1
- 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/TextInput.js +12 -0
- package/dist/module/components/TextInput.js.map +1 -0
- package/dist/module/components/index.js +5 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/jest/index.js +20 -14
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/runtime/native/conditions/media-query.js +2 -0
- package/dist/module/runtime/native/conditions/media-query.js.map +1 -1
- package/dist/module/runtime/native/injection.js +19 -18
- package/dist/module/runtime/native/injection.js.map +1 -1
- package/dist/module/runtime/native/react/rules.js +13 -8
- package/dist/module/runtime/native/react/rules.js.map +1 -1
- package/dist/module/runtime/native/react/useNativeCss.js +1 -1
- package/dist/module/runtime/native/react/useNativeCss.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 +6 -3
- 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/{calc.js → functions/calc.js} +1 -1
- 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 +8 -0
- package/dist/module/runtime/native/styles/functions/index.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/transform-functions.js +76 -0
- package/dist/module/runtime/native/styles/functions/transform-functions.js.map +1 -0
- 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} +2 -2
- 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/shorthands/transform.js.map +1 -0
- package/dist/module/runtime/native/styles/units.js +1 -1
- package/dist/module/runtime/native/styles/units.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/typescript/commonjs/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts +1 -3
- package/dist/typescript/commonjs/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +9 -9
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- 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/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 +5 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts +11 -1
- package/dist/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/runtime/native/injection.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.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.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 +6 -0
- package/dist/typescript/commonjs/src/runtime/native/styles/functions/index.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/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/utils/objects.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/atRules.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.types.d.ts +1 -3
- package/dist/typescript/module/src/compiler/compiler.types.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +9 -9
- package/dist/typescript/module/src/compiler/declarations.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- 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/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 +5 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/jest/index.d.ts +11 -1
- package/dist/typescript/module/src/jest/index.d.ts.map +1 -1
- package/dist/typescript/module/src/runtime/native/injection.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.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.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 +6 -0
- package/dist/typescript/module/src/runtime/native/styles/functions/index.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/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/utils/objects.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/compiler/atRules.ts +16 -2
- package/src/compiler/compiler.types.ts +1 -3
- package/src/compiler/declarations.ts +182 -95
- package/src/compiler/keyframes.ts +1 -1
- package/src/compiler/stylesheet.ts +17 -7
- 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/TextInput.tsx +17 -0
- package/src/components/index.tsx +5 -0
- package/src/jest/index.ts +22 -13
- package/src/runtime/native/conditions/media-query.ts +2 -0
- package/src/runtime/native/injection.ts +31 -30
- package/src/runtime/native/react/rules.ts +14 -5
- package/src/runtime/native/react/useNativeCss.ts +1 -1
- package/src/runtime/native/reanimated.ts +22 -0
- package/src/runtime/native/styles/calculate-props.ts +4 -3
- 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/{calc.ts → functions/calc.ts} +2 -2
- package/src/runtime/native/styles/{filters.ts → functions/filters.ts} +3 -3
- package/src/runtime/native/styles/functions/index.ts +5 -0
- package/src/runtime/native/styles/{platform-functions.ts → functions/platform-functions.ts} +2 -2
- package/src/runtime/native/styles/functions/transform-functions.ts +51 -0
- 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 -63
- package/src/runtime/native/styles/{border.ts → shorthands/border.ts} +1 -1
- package/src/runtime/native/styles/{box-shadow.ts → shorthands/box-shadow.ts} +3 -3
- 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} +1 -1
- package/src/runtime/native/styles/units.ts +1 -1
- package/src/runtime/utils/objects.ts +14 -4
- 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.map +0 -1
- 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/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.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/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/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/dist/commonjs/runtime/native/styles/{transform.js → shorthands/transform.js} +0 -0
- /package/dist/module/runtime/native/styles/{transform.js → shorthands/transform.js} +0 -0
|
@@ -27,6 +27,8 @@ function getDeepPath(source, paths) {
|
|
|
27
27
|
target = target[path];
|
|
28
28
|
}
|
|
29
29
|
return target;
|
|
30
|
+
} else if (_defaults.transformKeys.has(paths)) {
|
|
31
|
+
return source?.transform?.find(t => t[paths] !== undefined);
|
|
30
32
|
} else {
|
|
31
33
|
return source?.[paths];
|
|
32
34
|
}
|
|
@@ -45,20 +47,26 @@ function applyShorthand(value) {
|
|
|
45
47
|
return target;
|
|
46
48
|
}
|
|
47
49
|
function applyValue(target, prop, value) {
|
|
50
|
+
// This is confusing.
|
|
51
|
+
// An undefined value means "don't set anything" (something failed while parsing)
|
|
52
|
+
// While a null value means "remove this value", which in React Native means "set to undefined"
|
|
48
53
|
if (value === undefined) {
|
|
49
54
|
return;
|
|
55
|
+
} else if (value === null) {
|
|
56
|
+
value = undefined;
|
|
50
57
|
}
|
|
51
58
|
if (_defaults.transformKeys.has(prop)) {
|
|
52
59
|
if (!Array.isArray(target.transform)) {
|
|
53
60
|
target.transform = [];
|
|
54
61
|
}
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
const transformArray = target.transform;
|
|
63
|
+
|
|
64
|
+
// Remove any existing values
|
|
65
|
+
target.transform = transformArray.filter(t => !(prop in t));
|
|
66
|
+
if (Array.isArray(value)) {
|
|
67
|
+
target.transform.push(...value);
|
|
58
68
|
} else {
|
|
59
|
-
target.transform.push(
|
|
60
|
-
[prop]: value
|
|
61
|
-
});
|
|
69
|
+
target.transform.push(value);
|
|
62
70
|
}
|
|
63
71
|
return;
|
|
64
72
|
} else if (typeof value === "object" && value && _constants.ShortHandSymbol in value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","_defaults","getDeepPath","source","paths","undefined","Array","isArray","target","path","
|
|
1
|
+
{"version":3,"names":["_constants","require","_defaults","getDeepPath","source","paths","undefined","Array","isArray","target","path","transformKeys","has","transform","find","t","applyShorthand","value","ShortHandSymbol","values","prop","applyValue","transformArray","filter","push","Object","assign","setDeepPath","i","length"],"sourceRoot":"../../../../src","sources":["runtime/utils/objects.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -45,7 +45,16 @@ function isPropAtRule(rule) {
|
|
|
45
45
|
return rule.type === "unknown" && rule.value.name === "prop";
|
|
46
46
|
}
|
|
47
47
|
export function parsePropAtRule(rules) {
|
|
48
|
-
|
|
48
|
+
// Include any default mapping here
|
|
49
|
+
const mapping = {
|
|
50
|
+
"caret-color": ["cursorColor"],
|
|
51
|
+
"fill": ["fill"],
|
|
52
|
+
"stroke": ["stroke"],
|
|
53
|
+
"stroke-width": ["strokeWidth"],
|
|
54
|
+
"-webkit-line-clamp": ["numberOfLines"],
|
|
55
|
+
"-rn-ripple-color": ["android_ripple", "color"],
|
|
56
|
+
"-rn-ripple-style": ["android_ripple", "borderless"]
|
|
57
|
+
};
|
|
49
58
|
if (!rules) return mapping;
|
|
50
59
|
for (const rule of rules) {
|
|
51
60
|
if (!isPropAtRule(rule)) continue;
|
|
@@ -75,13 +84,17 @@ function propAtRuleBlock(token, mapping = {}) {
|
|
|
75
84
|
const [from, to] = splitByDelimiter(token, item => {
|
|
76
85
|
return item.value.type === "colon";
|
|
77
86
|
});
|
|
78
|
-
if (!from || from.length !== 1
|
|
87
|
+
if (!from || from.length !== 1) {
|
|
79
88
|
return mapping;
|
|
80
89
|
}
|
|
81
90
|
const fromToken = from[0];
|
|
82
91
|
if (!fromToken || fromToken.value.type !== "ident") {
|
|
83
92
|
return mapping;
|
|
84
93
|
}
|
|
94
|
+
if (!to) {
|
|
95
|
+
mapping["*"] = toRNProperty(fromToken.value.value);
|
|
96
|
+
return mapping;
|
|
97
|
+
}
|
|
85
98
|
mapping[toRNProperty(fromToken.value.value)] = to.flatMap((item, index) => {
|
|
86
99
|
switch (item.value.type) {
|
|
87
100
|
case "delim":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["toRNProperty","splitByDelimiter","maybeMutateReactNativeOptions","rule","builder","type","value","name","declarations","body","declaration","property","forEach","token","setOptions","isPropAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","propAtRuleBlock","block","blocks","blockRules","from","to","fromToken","flatMap","index"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;AAQA,SAASA,YAAY,QAAQ,gBAAa;AAC1C,SAASC,gBAAgB,QAAQ,yBAAsB;;AAYvD;AACA;AACA;;AAcA,OAAO,SAASC,6BAA6BA,CAC3CC,IAA8B,EAC9BC,OAA0B,EAC1B;EACA,IAAID,IAAI,CAACE,IAAI,KAAK,QAAQ,IAAIF,IAAI,CAACG,KAAK,EAAEC,IAAI,KAAK,cAAc,EAAE;IACjE;EACF;EAEA,MAAM;IAAEC;EAAa,CAAC,GAAGL,IAAI,CAACG,KAAK,CAACG,IAAI,CAACH,KAAK;EAC9C,IAAI,CAACE,YAAY,EAAE;EAEnB,KAAK,MAAME,WAAW,IAAIF,YAAY,EAAE;IACtC,IAAIE,WAAW,CAACC,QAAQ,KAAK,QAAQ,EAAE;IAEvC,QAAQD,WAAW,CAACJ,KAAK,CAACC,IAAI;MAC5B,KAAK,oBAAoB;QAAE;UACzBG,WAAW,CAACJ,KAAK,CAACA,KAAK,CAACM,OAAO,CAAEC,KAAK,IAAK;YACzC,IAAIA,KAAK,CAACR,IAAI,KAAK,cAAc,EAAE;cACjC;YACF;YAEA,IAAIQ,KAAK,CAACP,KAAK,KAAK,MAAM,IAAIO,KAAK,CAACP,KAAK,KAAK,OAAO,EAAE;cACrD;YACF;YAEAF,OAAO,CAACU,UAAU,CAAC,mBAAmB,EAAED,KAAK,CAACP,KAAK,KAAK,MAAM,CAAC;UACjE,CAAC,CAAC;UACF;QACF;MACA;QACE;IACJ;EACF;AACF;;AAEA;AACA;AACA;;AAEA,SAASS,YAAYA,CAACZ,IAAuB,EAAsB;EACjE,OAAOA,IAAI,CAACE,IAAI,KAAK,SAAS,IAAIF,IAAI,CAACG,KAAK,CAACC,IAAI,KAAK,MAAM;AAC9D;AAEA,OAAO,SAASS,eAAeA,CAACC,KAA6B,EAAE;EAC7D,MAAMC,OAAyB,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["toRNProperty","splitByDelimiter","maybeMutateReactNativeOptions","rule","builder","type","value","name","declarations","body","declaration","property","forEach","token","setOptions","isPropAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","propAtRuleBlock","block","blocks","blockRules","from","to","fromToken","flatMap","index"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;AAQA,SAASA,YAAY,QAAQ,gBAAa;AAC1C,SAASC,gBAAgB,QAAQ,yBAAsB;;AAYvD;AACA;AACA;;AAcA,OAAO,SAASC,6BAA6BA,CAC3CC,IAA8B,EAC9BC,OAA0B,EAC1B;EACA,IAAID,IAAI,CAACE,IAAI,KAAK,QAAQ,IAAIF,IAAI,CAACG,KAAK,EAAEC,IAAI,KAAK,cAAc,EAAE;IACjE;EACF;EAEA,MAAM;IAAEC;EAAa,CAAC,GAAGL,IAAI,CAACG,KAAK,CAACG,IAAI,CAACH,KAAK;EAC9C,IAAI,CAACE,YAAY,EAAE;EAEnB,KAAK,MAAME,WAAW,IAAIF,YAAY,EAAE;IACtC,IAAIE,WAAW,CAACC,QAAQ,KAAK,QAAQ,EAAE;IAEvC,QAAQD,WAAW,CAACJ,KAAK,CAACC,IAAI;MAC5B,KAAK,oBAAoB;QAAE;UACzBG,WAAW,CAACJ,KAAK,CAACA,KAAK,CAACM,OAAO,CAAEC,KAAK,IAAK;YACzC,IAAIA,KAAK,CAACR,IAAI,KAAK,cAAc,EAAE;cACjC;YACF;YAEA,IAAIQ,KAAK,CAACP,KAAK,KAAK,MAAM,IAAIO,KAAK,CAACP,KAAK,KAAK,OAAO,EAAE;cACrD;YACF;YAEAF,OAAO,CAACU,UAAU,CAAC,mBAAmB,EAAED,KAAK,CAACP,KAAK,KAAK,MAAM,CAAC;UACjE,CAAC,CAAC;UACF;QACF;MACA;QACE;IACJ;EACF;AACF;;AAEA;AACA;AACA;;AAEA,SAASS,YAAYA,CAACZ,IAAuB,EAAsB;EACjE,OAAOA,IAAI,CAACE,IAAI,KAAK,SAAS,IAAIF,IAAI,CAACG,KAAK,CAACC,IAAI,KAAK,MAAM;AAC9D;AAEA,OAAO,SAASS,eAAeA,CAACC,KAA6B,EAAE;EAC7D;EACA,MAAMC,OAAyB,GAAG;IAChC,aAAa,EAAE,CAAC,aAAa,CAAC;IAC9B,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,QAAQ,CAAC;IACpB,cAAc,EAAE,CAAC,aAAa,CAAC;IAC/B,oBAAoB,EAAE,CAAC,eAAe,CAAC;IACvC,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAC/C,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,YAAY;EACrD,CAAC;EAED,IAAI,CAACD,KAAK,EAAE,OAAOC,OAAO;EAE1B,KAAK,MAAMf,IAAI,IAAIc,KAAK,EAAE;IACxB,IAAI,CAACF,YAAY,CAACZ,IAAI,CAAC,EAAE;IAEzB,IAAIA,IAAI,CAACG,KAAK,CAACa,OAAO,CAACC,MAAM,GAAG,CAAC,EAAE;MACjC,MAAMD,OAAO,GAAGhB,IAAI,CAACG,KAAK,CAACa,OAAO,CAACE,MAAM,CAAEC,IAAI,IAAK;QAClD,OAAOA,IAAI,CAAChB,KAAK,CAACD,IAAI,KAAK,aAAa;MAC1C,CAAC,CAAC;MAEFkB,eAAe,CAACJ,OAAO,EAAED,OAAO,CAAC;IACnC,CAAC,MAAM,IAAIf,IAAI,CAACG,KAAK,CAACkB,KAAK,EAAE;MAC3B;MACA,MAAMC,MAAM,GAAGtB,IAAI,CAACG,KAAK,CAACkB,KAAK,CAACH,MAAM,CAAEC,IAAI,IAAK;QAC/C,OAAOA,IAAI,CAAChB,KAAK,CAACD,IAAI,KAAK,aAAa;MAC1C,CAAC,CAAC;;MAEF;MACA,MAAMqB,UAAU,GAAGzB,gBAAgB,CAACwB,MAAM,EAAGH,IAAI,IAAK;QACpD,OAAOA,IAAI,CAAChB,KAAK,CAACD,IAAI,KAAK,WAAW;MACxC,CAAC,CAAC;MAEF,KAAK,MAAMmB,KAAK,IAAIE,UAAU,EAAE;QAC9BH,eAAe,CAACC,KAAK,EAAEN,OAAO,CAAC;MACjC;IACF;EACF;EAEA,OAAOA,OAAO;AAChB;AAEA,SAASK,eAAeA,CACtBV,KAAiD,EACjDK,OAAyB,GAAG,CAAC,CAAC,EACZ;EAClB,MAAM,CAACS,IAAI,EAAEC,EAAE,CAAC,GAAG3B,gBAAgB,CAACY,KAAK,EAAGS,IAAI,IAAK;IACnD,OAAOA,IAAI,CAAChB,KAAK,CAACD,IAAI,KAAK,OAAO;EACpC,CAAC,CAAC;EAEF,IAAI,CAACsB,IAAI,IAAIA,IAAI,CAACP,MAAM,KAAK,CAAC,EAAE;IAC9B,OAAOF,OAAO;EAChB;EAEA,MAAMW,SAAS,GAAGF,IAAI,CAAC,CAAC,CAAC;EACzB,IAAI,CAACE,SAAS,IAAIA,SAAS,CAACvB,KAAK,CAACD,IAAI,KAAK,OAAO,EAAE;IAClD,OAAOa,OAAO;EAChB;EAEA,IAAI,CAACU,EAAE,EAAE;IACPV,OAAO,CAAC,GAAG,CAAC,GAAGlB,YAAY,CAAC6B,SAAS,CAACvB,KAAK,CAACA,KAAK,CAAC;IAClD,OAAOY,OAAO;EAChB;EAEAA,OAAO,CAAClB,YAAY,CAAC6B,SAAS,CAACvB,KAAK,CAACA,KAAK,CAAC,CAAC,GAAGsB,EAAE,CAACE,OAAO,CAAC,CAACR,IAAI,EAAES,KAAK,KAAK;IACzE,QAAQT,IAAI,CAAChB,KAAK,CAACD,IAAI;MACrB,KAAK,OAAO;QACV,OAAO0B,KAAK,KAAK,CAAC,IAAIT,IAAI,CAAChB,KAAK,CAACA,KAAK,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE;MAC7D,KAAK,OAAO;QACV,OAAO,CAACN,YAAY,CAACsB,IAAI,CAAChB,KAAK,CAACA,KAAK,CAAC,CAAC;MACzC;QACE,OAAO,EAAE;IACb;EACF,CAAC,CAAC;EAEF,OAAOY,OAAO;AAChB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VAR_SYMBOL"],"sourceRoot":"../../../src","sources":["compiler/compiler.types.ts"],"mappings":";;AAAA;;AAIA,SAASA,UAAU,QAAQ,iCAA8B;;AAkBzD;AACA;AACA;;AAkBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["VAR_SYMBOL"],"sourceRoot":"../../../src","sources":["compiler/compiler.types.ts"],"mappings":";;AAAA;;AAIA,SAASA,UAAU,QAAQ,iCAA8B;;AAkBzD;AACA;AACA;;AAkBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwFA;;AAeA;;AAMA;;AAwCS;;AAMkE;;AAI3E;;AAUA;;AAEA;AACA;AACA;AACA;AACA;;AAIA;;AAKA;;AAEA;;AAGA;AACA;AACA;;AAKA;AACA;AACA","ignoreList":[]}
|
|
@@ -9,7 +9,9 @@ const CommaSeparator = Symbol("CommaSeparator");
|
|
|
9
9
|
const propertyRename = {
|
|
10
10
|
"background-image": "experimental_backgroundImage"
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
// TODO: We need a better way to handle this
|
|
14
|
+
const unparsedRuntimeParsing = new Set(["animation", "border", "box-shadow", "text-shadow", "transform", "scale", "rotate", "translate"]);
|
|
13
15
|
const parsers = {
|
|
14
16
|
"align-content": parseAlignContent,
|
|
15
17
|
"align-items": parseAlignItems,
|
|
@@ -80,7 +82,7 @@ const parsers = {
|
|
|
80
82
|
"border-width": parseBorderWidth,
|
|
81
83
|
"bottom": parseSizeDeclaration,
|
|
82
84
|
"box-shadow": parseBoxShadow,
|
|
83
|
-
"caret-color":
|
|
85
|
+
"caret-color": parseColorOrAutoDeclaration,
|
|
84
86
|
"color": parseFontColorDeclaration,
|
|
85
87
|
"column-gap": parseGap,
|
|
86
88
|
"container": parseContainer,
|
|
@@ -199,9 +201,9 @@ export function parseDeclaration(declaration, builder) {
|
|
|
199
201
|
return;
|
|
200
202
|
}
|
|
201
203
|
if (declaration.property === "unparsed") {
|
|
202
|
-
|
|
204
|
+
parseUnparsedDeclaration(declaration, builder);
|
|
203
205
|
} else if (declaration.property === "custom") {
|
|
204
|
-
|
|
206
|
+
parseCustomDeclaration(declaration, builder);
|
|
205
207
|
} else {
|
|
206
208
|
parseWithParser(declaration, builder);
|
|
207
209
|
}
|
|
@@ -440,26 +442,26 @@ function parseFont({
|
|
|
440
442
|
function parseTransform({
|
|
441
443
|
value
|
|
442
444
|
}, builder) {
|
|
443
|
-
builder.addDescriptor("transform", [{}, "
|
|
445
|
+
builder.addDescriptor("transform", [{}, "transform", value.flatMap(t => {
|
|
444
446
|
switch (t.type) {
|
|
445
447
|
case "perspective":
|
|
446
|
-
return [[{}, "
|
|
448
|
+
return [[{}, "perspective", parseLength(t.value, builder)]];
|
|
447
449
|
case "translate":
|
|
448
|
-
return [[{}, "
|
|
450
|
+
return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value[0], builder)], [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value[1], builder)]]];
|
|
449
451
|
case "translateX":
|
|
450
|
-
return [[{}, "
|
|
452
|
+
return [[{}, "translateX", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
|
|
451
453
|
case "translateY":
|
|
452
|
-
return [[{}, "
|
|
454
|
+
return [[{}, "translateY", parseLengthOrCoercePercentageToRuntime(t.value, builder)]];
|
|
453
455
|
case "rotate":
|
|
454
|
-
return [[{}, "
|
|
456
|
+
return [[{}, "rotate", parseAngle(t.value, builder)]];
|
|
455
457
|
case "rotateX":
|
|
456
|
-
return [[{}, "
|
|
458
|
+
return [[{}, "rotateX", parseAngle(t.value, builder)]];
|
|
457
459
|
case "rotateY":
|
|
458
|
-
return [[{}, "
|
|
460
|
+
return [[{}, "rotateY", parseAngle(t.value, builder)]];
|
|
459
461
|
case "rotateZ":
|
|
460
|
-
return [[{}, "
|
|
462
|
+
return [[{}, "rotateZ", parseAngle(t.value, builder)]];
|
|
461
463
|
case "scale":
|
|
462
|
-
return [[{}, "
|
|
464
|
+
return [[{}, "scaleX", parseLength(t.value[0], builder)], [{}, "scaleY", parseLength(t.value[1], builder)]];
|
|
463
465
|
case "scaleX":
|
|
464
466
|
return [[{}, "scaleX", parseLength(t.value, builder)]];
|
|
465
467
|
case "scaleY":
|
|
@@ -491,9 +493,15 @@ function parseTranslate({
|
|
|
491
493
|
function parseRotate({
|
|
492
494
|
value
|
|
493
495
|
}, builder) {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
496
|
+
if (value.x) {
|
|
497
|
+
builder.addDescriptor("rotateX", [{}, "rotateX", parseAngle(value.angle, builder)]);
|
|
498
|
+
}
|
|
499
|
+
if (value.y) {
|
|
500
|
+
builder.addDescriptor("rotateY", [{}, "rotateY", parseAngle(value.angle, builder)]);
|
|
501
|
+
}
|
|
502
|
+
if (value.z) {
|
|
503
|
+
builder.addDescriptor("rotateZ", [{}, "rotateZ", parseAngle(value.angle, builder)]);
|
|
504
|
+
}
|
|
497
505
|
}
|
|
498
506
|
function parseScale({
|
|
499
507
|
value
|
|
@@ -535,7 +543,8 @@ function parseZIndex({
|
|
|
535
543
|
return;
|
|
536
544
|
}
|
|
537
545
|
}
|
|
538
|
-
function parseContainerType(
|
|
546
|
+
function parseContainerType(_declaration, builder) {
|
|
547
|
+
builder.addContainer(["___default___"]);
|
|
539
548
|
return;
|
|
540
549
|
}
|
|
541
550
|
function parseContainerName({
|
|
@@ -550,7 +559,7 @@ function parseContainer({
|
|
|
550
559
|
builder.addContainer(value.name.type === "none" ? false : value.name.value);
|
|
551
560
|
return;
|
|
552
561
|
}
|
|
553
|
-
export function
|
|
562
|
+
export function parseUnparsedDeclaration(declaration, builder) {
|
|
554
563
|
let property = declaration.value.propertyId.property;
|
|
555
564
|
if (!(property in parsers)) {
|
|
556
565
|
builder.addWarning("property", property);
|
|
@@ -571,14 +580,14 @@ export function parseDeclarationUnparsed(declaration, builder) {
|
|
|
571
580
|
*/
|
|
572
581
|
builder.descriptorProperty = property;
|
|
573
582
|
if (unparsedRuntimeParsing.has(property)) {
|
|
574
|
-
const args = parseUnparsed(declaration.value.value, builder);
|
|
583
|
+
const args = parseUnparsed(declaration.value.value, builder, property);
|
|
575
584
|
if (property === "animation") {
|
|
576
|
-
builder.addDescriptor("animation", [{},
|
|
585
|
+
builder.addDescriptor("animation", [{}, property, args]);
|
|
577
586
|
} else {
|
|
578
|
-
builder.addDescriptor(property, [{},
|
|
587
|
+
builder.addDescriptor(property, [{}, toRNProperty(property), args, 1]);
|
|
579
588
|
}
|
|
580
589
|
} else {
|
|
581
|
-
const value = parseUnparsed(declaration.value.value, builder);
|
|
590
|
+
const value = parseUnparsed(declaration.value.value, builder, property);
|
|
582
591
|
builder.addDescriptor(property, value);
|
|
583
592
|
if (property === "font-size") {
|
|
584
593
|
builder.addDescriptor("--__rn-css-em", value);
|
|
@@ -588,22 +597,20 @@ export function parseDeclarationUnparsed(declaration, builder) {
|
|
|
588
597
|
}
|
|
589
598
|
}
|
|
590
599
|
}
|
|
591
|
-
export function
|
|
600
|
+
export function parseCustomDeclaration(declaration, builder) {
|
|
592
601
|
const property = declaration.value.name;
|
|
593
|
-
if (
|
|
594
|
-
builder.
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
});
|
|
600
|
-
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, allowAuto.has(property)));
|
|
602
|
+
if (property === "-webkit-line-clamp") {
|
|
603
|
+
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
604
|
+
} else if (property === "-rn-ripple-style") {
|
|
605
|
+
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property) === "borderless");
|
|
606
|
+
} else if (validProperties.has(property) || property.startsWith("--") || property.startsWith("-rn-")) {
|
|
607
|
+
builder.addDescriptor(property, parseUnparsed(declaration.value.value, builder, property));
|
|
601
608
|
} else {
|
|
602
609
|
builder.addWarning("property", declaration.value.name);
|
|
603
610
|
}
|
|
604
611
|
}
|
|
605
|
-
export function reduceParseUnparsed(tokenOrValues, builder) {
|
|
606
|
-
const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder)).filter(v => v !== undefined);
|
|
612
|
+
export function reduceParseUnparsed(tokenOrValues, builder, property, allowAuto) {
|
|
613
|
+
const result = tokenOrValues.map(tokenOrValue => parseUnparsed(tokenOrValue, builder, property, allowAuto)).filter(v => v !== undefined);
|
|
607
614
|
if (result.length === 0) {
|
|
608
615
|
return undefined;
|
|
609
616
|
}
|
|
@@ -617,6 +624,9 @@ export function reduceParseUnparsed(tokenOrValues, builder) {
|
|
|
617
624
|
currentGroup.push(value);
|
|
618
625
|
}
|
|
619
626
|
}
|
|
627
|
+
|
|
628
|
+
// Groups are the tokens grouped together by comma location
|
|
629
|
+
// If a group only has 1 item, it shouldn't be an array
|
|
620
630
|
groups = groups.flatMap(group => {
|
|
621
631
|
if (!Array.isArray(group)) {
|
|
622
632
|
return [];
|
|
@@ -630,21 +640,26 @@ export function reduceParseUnparsed(tokenOrValues, builder) {
|
|
|
630
640
|
} else {
|
|
631
641
|
return [first];
|
|
632
642
|
}
|
|
643
|
+
} else if (
|
|
644
|
+
// This is a special case for <ratio> values
|
|
645
|
+
group.includes("/") && group.every(item => typeof item === "string" && item === "/" ? item : typeof item === "number")) {
|
|
646
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
647
|
+
return [group.join(" ")];
|
|
633
648
|
} else {
|
|
634
649
|
return [group];
|
|
635
650
|
}
|
|
636
651
|
});
|
|
637
652
|
return groups.length === 1 ? groups[0] : groups;
|
|
638
653
|
}
|
|
639
|
-
export function unparsedFunction(token, builder) {
|
|
640
|
-
return [{}, token.value.name, reduceParseUnparsed(token.value.arguments, builder)];
|
|
654
|
+
export function unparsedFunction(token, builder, property, allowAuto) {
|
|
655
|
+
return [{}, toRNProperty(token.value.name), reduceParseUnparsed(token.value.arguments, builder, property, allowAuto)];
|
|
641
656
|
}
|
|
642
657
|
|
|
643
658
|
/**
|
|
644
659
|
* When the CSS cannot be parsed (often due to a runtime condition like a CSS variable)
|
|
645
660
|
* This export function best efforts parsing it into a export function that we can evaluate at runtime
|
|
646
661
|
*/
|
|
647
|
-
export function parseUnparsed(tokenOrValue, builder, allowAuto =
|
|
662
|
+
export function parseUnparsed(tokenOrValue, builder, property, allowAuto = allowAutoProperties.has(property)) {
|
|
648
663
|
if (tokenOrValue === undefined || tokenOrValue === null) {
|
|
649
664
|
return;
|
|
650
665
|
}
|
|
@@ -663,7 +678,7 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
663
678
|
return round(tokenOrValue);
|
|
664
679
|
}
|
|
665
680
|
if (Array.isArray(tokenOrValue)) {
|
|
666
|
-
const args = reduceParseUnparsed(tokenOrValue, builder);
|
|
681
|
+
const args = reduceParseUnparsed(tokenOrValue, builder, property, allowAuto);
|
|
667
682
|
if (!args) return;
|
|
668
683
|
if (Array.isArray(args) && args.length === 1) return args[0];
|
|
669
684
|
return args;
|
|
@@ -671,12 +686,12 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
671
686
|
switch (tokenOrValue.type) {
|
|
672
687
|
case "unresolved-color":
|
|
673
688
|
{
|
|
674
|
-
return parseUnresolvedColor(tokenOrValue.value, builder);
|
|
689
|
+
return parseUnresolvedColor(tokenOrValue.value, builder, property, allowAuto);
|
|
675
690
|
}
|
|
676
691
|
case "var":
|
|
677
692
|
{
|
|
678
693
|
let args = tokenOrValue.value.name.ident.slice(2);
|
|
679
|
-
const fallback = parseUnparsed(tokenOrValue.value.fallback, builder);
|
|
694
|
+
const fallback = parseUnparsed(tokenOrValue.value.fallback, builder, property, allowAuto);
|
|
680
695
|
if (fallback !== undefined) {
|
|
681
696
|
args = [args, fallback];
|
|
682
697
|
}
|
|
@@ -685,51 +700,51 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
685
700
|
case "function":
|
|
686
701
|
{
|
|
687
702
|
switch (tokenOrValue.value.name) {
|
|
688
|
-
case "translate":
|
|
689
|
-
case "rotate":
|
|
690
|
-
case "rotateX":
|
|
691
|
-
case "rotateY":
|
|
692
|
-
case "skewX":
|
|
693
|
-
case "skewY":
|
|
694
|
-
case "scale":
|
|
695
|
-
case "scaleX":
|
|
696
|
-
case "scaleY":
|
|
697
|
-
case "translateX":
|
|
698
|
-
case "translateY":
|
|
699
|
-
tokenOrValue.value.name = `@${tokenOrValue.value.name}`;
|
|
700
|
-
return unparsedFunction(tokenOrValue, builder);
|
|
701
703
|
case "blur":
|
|
702
704
|
case "brightness":
|
|
703
705
|
case "contrast":
|
|
704
706
|
case "cubic-bezier":
|
|
705
707
|
case "drop-shadow":
|
|
706
708
|
case "fontScale":
|
|
709
|
+
case "getPixelSizeForLayoutSize":
|
|
707
710
|
case "grayscale":
|
|
708
711
|
case "hsl":
|
|
709
712
|
case "hsla":
|
|
710
713
|
case "hue-rotate":
|
|
711
714
|
case "invert":
|
|
712
|
-
case "linear-gradient":
|
|
713
715
|
case "opacity":
|
|
714
716
|
case "pixelScale":
|
|
715
|
-
case "pixelSizeForLayoutSize":
|
|
716
717
|
case "platformColor":
|
|
717
|
-
case "radial-gradient":
|
|
718
718
|
case "rgb":
|
|
719
719
|
case "rgba":
|
|
720
|
+
case "rotate":
|
|
721
|
+
case "rotateX":
|
|
722
|
+
case "rotateY":
|
|
720
723
|
case "roundToNearestPixel":
|
|
721
724
|
case "saturate":
|
|
725
|
+
case "scale":
|
|
726
|
+
case "scaleX":
|
|
727
|
+
case "scaleY":
|
|
722
728
|
case "sepia":
|
|
723
729
|
case "shadow":
|
|
730
|
+
case "skewX":
|
|
731
|
+
case "skewY":
|
|
724
732
|
case "steps":
|
|
725
|
-
|
|
733
|
+
case "translate":
|
|
734
|
+
case "translateX":
|
|
735
|
+
case "translateY":
|
|
736
|
+
return unparsedFunction(tokenOrValue, builder, property, allowAuto);
|
|
737
|
+
case "linear-gradient":
|
|
738
|
+
case "radial-gradient":
|
|
739
|
+
// These are special as React Native requires the '-' in their name
|
|
740
|
+
return [{}, tokenOrValue.value.name, reduceParseUnparsed(tokenOrValue.value.arguments, builder, property, allowAuto)];
|
|
726
741
|
case "hairlineWidth":
|
|
727
742
|
return [{}, tokenOrValue.value.name, []];
|
|
728
743
|
case "calc":
|
|
729
744
|
case "max":
|
|
730
745
|
case "min":
|
|
731
746
|
case "clamp":
|
|
732
|
-
return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder);
|
|
747
|
+
return parseCalcFn(tokenOrValue.value.name, tokenOrValue.value.arguments, builder, property);
|
|
733
748
|
default:
|
|
734
749
|
{
|
|
735
750
|
builder.addWarning("value", `${tokenOrValue.value.name}()`);
|
|
@@ -761,6 +776,8 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
761
776
|
return true;
|
|
762
777
|
} else if (value === "false") {
|
|
763
778
|
return false;
|
|
779
|
+
} else if (value === "infinity") {
|
|
780
|
+
return Number.MAX_SAFE_INTEGER;
|
|
764
781
|
} else {
|
|
765
782
|
return value;
|
|
766
783
|
}
|
|
@@ -778,11 +795,17 @@ export function parseUnparsed(tokenOrValue, builder, allowAuto = false) {
|
|
|
778
795
|
return parseDimension(tokenOrValue.value, builder);
|
|
779
796
|
case "comma":
|
|
780
797
|
return CommaSeparator;
|
|
798
|
+
case "delim":
|
|
799
|
+
{
|
|
800
|
+
if (tokenOrValue.value.value === "/") {
|
|
801
|
+
return tokenOrValue.value.value;
|
|
802
|
+
}
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
781
805
|
case "at-keyword":
|
|
782
806
|
case "hash":
|
|
783
807
|
case "id-hash":
|
|
784
808
|
case "unquoted-url":
|
|
785
|
-
case "delim":
|
|
786
809
|
case "white-space":
|
|
787
810
|
case "comment":
|
|
788
811
|
case "colon":
|
|
@@ -846,7 +869,9 @@ export function parseLength(length, builder) {
|
|
|
846
869
|
} else if (length.value === -Infinity) {
|
|
847
870
|
return -9999;
|
|
848
871
|
} else {
|
|
849
|
-
|
|
872
|
+
// Normalize large values to safe integers, e.g. `calc(infinity * 1px)`
|
|
873
|
+
const value = Math.max(Math.min(length.value, Number.MAX_SAFE_INTEGER), Number.MIN_SAFE_INTEGER);
|
|
874
|
+
return round(value);
|
|
850
875
|
}
|
|
851
876
|
}
|
|
852
877
|
case "rem":
|
|
@@ -1001,7 +1026,7 @@ export function parseSize(size, builder, options, {
|
|
|
1001
1026
|
}
|
|
1002
1027
|
return;
|
|
1003
1028
|
}
|
|
1004
|
-
export function
|
|
1029
|
+
export function parseColorOrAutoDeclaration({
|
|
1005
1030
|
value
|
|
1006
1031
|
}, builder) {
|
|
1007
1032
|
if (value.type === "auto") {
|
|
@@ -1683,9 +1708,6 @@ export function parseSVGPaint({
|
|
|
1683
1708
|
} else {
|
|
1684
1709
|
return;
|
|
1685
1710
|
}
|
|
1686
|
-
builder.addMapping({
|
|
1687
|
-
[property]: [property]
|
|
1688
|
-
});
|
|
1689
1711
|
builder.addDescriptor(property, parsedValue);
|
|
1690
1712
|
}
|
|
1691
1713
|
export function round(number) {
|
|
@@ -1700,7 +1722,7 @@ export function parseDimensionPercentageFor_LengthValue(value, builder) {
|
|
|
1700
1722
|
return parseLength(value.value, builder);
|
|
1701
1723
|
}
|
|
1702
1724
|
}
|
|
1703
|
-
const
|
|
1725
|
+
const allowAutoProperties = new Set(["pointer-events"]);
|
|
1704
1726
|
export function parseEnv(value, builder) {
|
|
1705
1727
|
switch (value.name.type) {
|
|
1706
1728
|
case "ua":
|
|
@@ -1709,7 +1731,7 @@ export function parseEnv(value, builder) {
|
|
|
1709
1731
|
case "safe-area-inset-right":
|
|
1710
1732
|
case "safe-area-inset-bottom":
|
|
1711
1733
|
case "safe-area-inset-left":
|
|
1712
|
-
return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder)], 1];
|
|
1734
|
+
return [{}, "var", [`--react-native-css-${value.name.value}`, parseUnparsed(value.fallback, builder, value.name.value)], 1];
|
|
1713
1735
|
case "viewport-segment-width":
|
|
1714
1736
|
case "viewport-segment-height":
|
|
1715
1737
|
case "viewport-segment-top":
|
|
@@ -1723,14 +1745,14 @@ export function parseEnv(value, builder) {
|
|
|
1723
1745
|
}
|
|
1724
1746
|
return;
|
|
1725
1747
|
}
|
|
1726
|
-
export function parseCalcFn(name, tokens, builder) {
|
|
1727
|
-
const args = parseCalcArguments(tokens, builder);
|
|
1748
|
+
export function parseCalcFn(name, tokens, builder, property) {
|
|
1749
|
+
const args = parseCalcArguments(tokens, builder, property);
|
|
1728
1750
|
if (args) {
|
|
1729
1751
|
return [{}, name, args];
|
|
1730
1752
|
}
|
|
1731
1753
|
return;
|
|
1732
1754
|
}
|
|
1733
|
-
export function parseCalcArguments([...args], builder) {
|
|
1755
|
+
export function parseCalcArguments([...args], builder, property) {
|
|
1734
1756
|
const parsed = [];
|
|
1735
1757
|
let mode;
|
|
1736
1758
|
for (const [currentIndex, arg] of args.entries()) {
|
|
@@ -1744,7 +1766,7 @@ export function parseCalcArguments([...args], builder) {
|
|
|
1744
1766
|
case "function":
|
|
1745
1767
|
case "unresolved-color":
|
|
1746
1768
|
{
|
|
1747
|
-
const value = parseUnparsed(arg, builder);
|
|
1769
|
+
const value = parseUnparsed(arg, builder, property);
|
|
1748
1770
|
if (value === undefined) {
|
|
1749
1771
|
return undefined;
|
|
1750
1772
|
}
|
|
@@ -1813,7 +1835,7 @@ export function parseCalcArguments([...args], builder) {
|
|
|
1813
1835
|
.splice(currentIndex, closeParenthesisIndex - currentIndex + 1)
|
|
1814
1836
|
// Then drop the surrounding parenthesis
|
|
1815
1837
|
.slice(1, -1);
|
|
1816
|
-
parsed.push(parseCalcFn("calc", innerCalcArgs, builder));
|
|
1838
|
+
parsed.push(parseCalcFn("calc", innerCalcArgs, builder, property));
|
|
1817
1839
|
break;
|
|
1818
1840
|
}
|
|
1819
1841
|
case "close-parenthesis":
|
|
@@ -1854,20 +1876,20 @@ export function parseTranslateProp(value, prop, builder) {
|
|
|
1854
1876
|
}
|
|
1855
1877
|
return parseLength(value[prop], builder);
|
|
1856
1878
|
}
|
|
1857
|
-
export function parseUnresolvedColor(color, builder) {
|
|
1879
|
+
export function parseUnresolvedColor(color, builder, property, allowAuto) {
|
|
1858
1880
|
switch (color.type) {
|
|
1859
1881
|
case "rgb":
|
|
1860
|
-
return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder)]];
|
|
1882
|
+
return [{}, "rgba", [round(color.r * 255), round(color.g * 255), round(color.b * 255), parseUnparsed(color.alpha, builder, property)]];
|
|
1861
1883
|
case "hsl":
|
|
1862
|
-
return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder)]];
|
|
1884
|
+
return [{}, color.type, [color.h, color.s, color.l, parseUnparsed(color.alpha, builder, property)]];
|
|
1863
1885
|
case "light-dark":
|
|
1864
1886
|
{
|
|
1865
1887
|
const extraRule = builder.extendRule({
|
|
1866
1888
|
m: [["=", "prefers-color-scheme", "dark"]]
|
|
1867
1889
|
});
|
|
1868
|
-
builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder), false, extraRule);
|
|
1890
|
+
builder.addUnnamedDescriptor(reduceParseUnparsed(color.dark, builder, property, allowAuto), false, extraRule);
|
|
1869
1891
|
builder.addExtraRule(extraRule);
|
|
1870
|
-
return reduceParseUnparsed(color.light, builder);
|
|
1892
|
+
return reduceParseUnparsed(color.light, builder, property, allowAuto);
|
|
1871
1893
|
}
|
|
1872
1894
|
default:
|
|
1873
1895
|
color;
|
|
@@ -2026,7 +2048,7 @@ function parseGradient(gradient, builder) {
|
|
|
2026
2048
|
switch (gradient.type) {
|
|
2027
2049
|
case "linear":
|
|
2028
2050
|
{
|
|
2029
|
-
return [{}, "
|
|
2051
|
+
return [{}, "linear-gradient", [parseLineDirection(gradient.direction, builder), ...gradient.items.map(item => parseGradientItem(item, builder))]];
|
|
2030
2052
|
}
|
|
2031
2053
|
}
|
|
2032
2054
|
return;
|
|
@@ -2083,6 +2105,7 @@ function parseFilter(declaration, builder) {
|
|
|
2083
2105
|
[value.type]: parseAngle(value.value, builder)
|
|
2084
2106
|
};
|
|
2085
2107
|
case "drop-shadow":
|
|
2108
|
+
return [{}, toRNProperty(value.type), [parseLength(value.value.xOffset, builder), parseLength(value.value.yOffset, builder), parseLength(value.value.blur, builder), parseColor(value.value.color, builder)]];
|
|
2086
2109
|
case "url":
|
|
2087
2110
|
return;
|
|
2088
2111
|
}
|