react-native-css 3.0.0-preview.3 → 3.0.0-preview.5
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 +30 -16
- package/dist/commonjs/compiler/atRules.js.map +1 -1
- package/dist/commonjs/compiler/compiler.js +29 -19
- package/dist/commonjs/compiler/compiler.js.map +1 -1
- package/dist/commonjs/compiler/declarations.js +10 -10
- 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/lightningcss-loader.js +40 -0
- package/dist/commonjs/compiler/lightningcss-loader.js.map +1 -0
- package/dist/commonjs/compiler/selector-builder.js +3 -2
- package/dist/commonjs/compiler/selector-builder.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +5 -7
- package/dist/commonjs/compiler/stylesheet.js.map +1 -1
- package/dist/commonjs/components/ActivityIndicator.js.map +1 -1
- package/dist/commonjs/components/Button.js.map +1 -1
- package/dist/commonjs/components/FlatList.js +4 -3
- package/dist/commonjs/components/FlatList.js.map +1 -1
- package/dist/commonjs/components/Image.js.map +1 -1
- package/dist/commonjs/components/ImageBackground.js +22 -0
- package/dist/commonjs/components/ImageBackground.js.map +1 -0
- package/dist/commonjs/components/KeyboardAvoidingView.js +19 -0
- package/dist/commonjs/components/KeyboardAvoidingView.js.map +1 -0
- package/dist/commonjs/components/Pressable.js +17 -0
- package/dist/commonjs/components/Pressable.js.map +1 -0
- package/dist/commonjs/components/ScrollView.js +18 -0
- package/dist/commonjs/components/ScrollView.js.map +1 -0
- package/dist/commonjs/components/TextInput.js +6 -1
- package/dist/commonjs/components/TextInput.js.map +1 -1
- package/dist/commonjs/components/TouchableHighlight.js +17 -0
- package/dist/commonjs/components/TouchableHighlight.js.map +1 -0
- package/dist/commonjs/components/TouchableOpacity.js +17 -0
- package/dist/commonjs/components/TouchableOpacity.js.map +1 -0
- package/dist/commonjs/components/TouchableWithoutFeedback.js +17 -0
- package/dist/commonjs/components/TouchableWithoutFeedback.js.map +1 -0
- package/dist/commonjs/components/VirtualizedList.js +20 -0
- package/dist/commonjs/components/VirtualizedList.js.map +1 -0
- package/dist/commonjs/components/index.cjs +265 -0
- package/dist/commonjs/components/index.cjs.map +1 -0
- package/dist/commonjs/components/index.js +65 -1
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/index.js +0 -11
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/jest/index.js +1 -1
- package/dist/commonjs/jest/index.js.map +1 -1
- package/dist/commonjs/metro/index.js +7 -117
- package/dist/commonjs/metro/index.js.map +1 -1
- package/dist/commonjs/metro/metro-transformer.js +8 -1
- package/dist/commonjs/metro/metro-transformer.js.map +1 -1
- package/dist/commonjs/{native/metro.js → metro/override.js} +1 -1
- package/dist/commonjs/{native/metro.js.map → metro/override.js.map} +1 -1
- package/dist/commonjs/metro/resolver.js +11 -20
- package/dist/commonjs/metro/resolver.js.map +1 -1
- package/dist/commonjs/native/index.js +8 -8
- package/dist/commonjs/native/index.js.map +1 -1
- package/dist/commonjs/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
- package/dist/commonjs/native/react-native-css-metro-override.js.map +1 -0
- package/dist/commonjs/native/styles/calculate-props.js +1 -1
- package/dist/commonjs/native/styles/resolve.js +0 -1
- package/dist/commonjs/native/styles/resolve.js.map +1 -1
- package/dist/commonjs/native/styles/shorthands/animation.js +6 -2
- package/dist/commonjs/native/styles/shorthands/animation.js.map +1 -1
- package/dist/module/compiler/atRules.js +30 -16
- package/dist/module/compiler/atRules.js.map +1 -1
- package/dist/module/compiler/compiler.js +25 -15
- package/dist/module/compiler/compiler.js.map +1 -1
- package/dist/module/compiler/declarations.js +10 -10
- 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/lightningcss-loader.js +36 -0
- package/dist/module/compiler/lightningcss-loader.js.map +1 -0
- package/dist/module/compiler/selector-builder.js +3 -2
- package/dist/module/compiler/selector-builder.js.map +1 -1
- package/dist/module/compiler/stylesheet.js +5 -7
- package/dist/module/compiler/stylesheet.js.map +1 -1
- package/dist/module/components/ActivityIndicator.js.map +1 -1
- package/dist/module/components/Button.js.map +1 -1
- package/dist/module/components/FlatList.js +4 -3
- package/dist/module/components/FlatList.js.map +1 -1
- package/dist/module/components/Image.js.map +1 -1
- package/dist/module/components/ImageBackground.js +17 -0
- package/dist/module/components/ImageBackground.js.map +1 -0
- package/dist/module/components/KeyboardAvoidingView.js +14 -0
- package/dist/module/components/KeyboardAvoidingView.js.map +1 -0
- package/dist/module/components/Pressable.js +12 -0
- package/dist/module/components/Pressable.js.map +1 -0
- package/dist/module/components/ScrollView.js +13 -0
- package/dist/module/components/ScrollView.js.map +1 -0
- package/dist/module/components/TextInput.js +6 -1
- package/dist/module/components/TextInput.js.map +1 -1
- package/dist/module/components/TouchableHighlight.js +12 -0
- package/dist/module/components/TouchableHighlight.js.map +1 -0
- package/dist/module/components/TouchableOpacity.js +12 -0
- package/dist/module/components/TouchableOpacity.js.map +1 -0
- package/dist/module/components/TouchableWithoutFeedback.js +12 -0
- package/dist/module/components/TouchableWithoutFeedback.js.map +1 -0
- package/dist/module/components/VirtualizedList.js +15 -0
- package/dist/module/components/VirtualizedList.js.map +1 -0
- package/dist/module/components/index.cjs +265 -0
- package/dist/module/components/index.cjs.map +1 -0
- package/dist/module/components/index.js +8 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/jest/index.js +1 -1
- package/dist/module/jest/index.js.map +1 -1
- package/dist/module/metro/index.js +7 -116
- package/dist/module/metro/index.js.map +1 -1
- package/dist/module/metro/metro-transformer.js +8 -1
- package/dist/module/metro/metro-transformer.js.map +1 -1
- package/dist/module/metro/override.js +4 -0
- package/dist/module/{native/metro.js.map → metro/override.js.map} +1 -1
- package/dist/module/metro/resolver.js +11 -20
- package/dist/module/metro/resolver.js.map +1 -1
- package/dist/module/native/index.js +1 -1
- package/dist/module/native/index.js.map +1 -1
- package/dist/module/{poison.pill.js → native/react-native-css-metro-override.js} +1 -1
- package/dist/module/native/react-native-css-metro-override.js.map +1 -0
- package/dist/module/native/styles/calculate-props.js +1 -1
- package/dist/module/native/styles/resolve.js +0 -1
- package/dist/module/native/styles/resolve.js.map +1 -1
- package/dist/module/native/styles/shorthands/animation.js +4 -1
- package/dist/module/native/styles/shorthands/animation.js.map +1 -1
- package/dist/typescript/commonjs/.config/eslint.config.d.mts +3 -0
- package/dist/typescript/commonjs/.config/eslint.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/eslint.config.d.mts +2 -0
- package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/example/app.config.d.ts.map +1 -1
- package/dist/typescript/commonjs/example/index.d.ts +2 -0
- package/dist/typescript/commonjs/example/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/example/metro.config.d.ts +3 -0
- package/dist/typescript/commonjs/example/metro.config.d.ts.map +1 -0
- package/dist/typescript/commonjs/example/postcss.config.d.mts +7 -0
- package/dist/typescript/commonjs/example/postcss.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/example/src/App.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/declarations.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts +1 -1
- package/dist/typescript/commonjs/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts +30 -0
- package/dist/typescript/commonjs/src/compiler/lightningcss-loader.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts +2 -1
- package/dist/typescript/commonjs/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts +3 -10
- package/dist/typescript/commonjs/src/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Button.d.ts +3 -10
- package/dist/typescript/commonjs/src/components/Button.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/FlatList.d.ts +3 -7
- package/dist/typescript/commonjs/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/Image.d.ts +3 -5
- package/dist/typescript/commonjs/src/components/Image.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/ImageBackground.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/KeyboardAvoidingView.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/Pressable.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/Pressable.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/ScrollView.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TextInput.d.ts +3 -5
- package/dist/typescript/commonjs/src/components/TextInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/TouchableHighlight.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/TouchableOpacity.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/TouchableWithoutFeedback.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts +6 -0
- package/dist/typescript/commonjs/src/components/VirtualizedList.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.cts +2 -0
- package/dist/typescript/commonjs/src/components/index.d.cts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/index.d.ts +0 -1
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -1
- 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/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/metro/override.d.ts +2 -0
- package/dist/typescript/commonjs/src/metro/override.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/index.d.ts +1 -1
- package/dist/typescript/commonjs/src/native/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts +2 -0
- package/dist/typescript/commonjs/src/native/react-native-css-metro-override.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts +1 -0
- package/dist/typescript/commonjs/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/dist/typescript/module/.config/eslint.config.d.mts +3 -0
- package/dist/typescript/module/.config/eslint.config.d.mts.map +1 -0
- package/dist/typescript/module/eslint.config.d.mts +2 -0
- package/dist/typescript/module/eslint.config.d.mts.map +1 -0
- package/dist/typescript/module/example/app.config.d.ts.map +1 -1
- package/dist/typescript/module/example/index.d.ts +2 -0
- package/dist/typescript/module/example/index.d.ts.map +1 -0
- package/dist/typescript/module/example/metro.config.d.ts +3 -0
- package/dist/typescript/module/example/metro.config.d.ts.map +1 -0
- package/dist/typescript/module/example/postcss.config.d.mts +7 -0
- package/dist/typescript/module/example/postcss.config.d.mts.map +1 -0
- package/dist/typescript/module/example/src/App.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/compiler.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/declarations.d.ts +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts +1 -1
- package/dist/typescript/module/src/compiler/keyframes.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts +30 -0
- package/dist/typescript/module/src/compiler/lightningcss-loader.d.ts.map +1 -0
- package/dist/typescript/module/src/compiler/selector-builder.d.ts.map +1 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts +2 -1
- package/dist/typescript/module/src/compiler/stylesheet.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts +3 -10
- package/dist/typescript/module/src/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Button.d.ts +3 -10
- package/dist/typescript/module/src/components/Button.d.ts.map +1 -1
- package/dist/typescript/module/src/components/FlatList.d.ts +3 -7
- package/dist/typescript/module/src/components/FlatList.d.ts.map +1 -1
- package/dist/typescript/module/src/components/Image.d.ts +3 -5
- package/dist/typescript/module/src/components/Image.d.ts.map +1 -1
- package/dist/typescript/module/src/components/ImageBackground.d.ts +6 -0
- package/dist/typescript/module/src/components/ImageBackground.d.ts.map +1 -0
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts +6 -0
- package/dist/typescript/module/src/components/KeyboardAvoidingView.d.ts.map +1 -0
- package/dist/typescript/module/src/components/Pressable.d.ts +6 -0
- package/dist/typescript/module/src/components/Pressable.d.ts.map +1 -0
- package/dist/typescript/module/src/components/ScrollView.d.ts +6 -0
- package/dist/typescript/module/src/components/ScrollView.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TextInput.d.ts +3 -5
- package/dist/typescript/module/src/components/TextInput.d.ts.map +1 -1
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts +6 -0
- package/dist/typescript/module/src/components/TouchableHighlight.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts +6 -0
- package/dist/typescript/module/src/components/TouchableOpacity.d.ts.map +1 -0
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts +6 -0
- package/dist/typescript/module/src/components/TouchableWithoutFeedback.d.ts.map +1 -0
- package/dist/typescript/module/src/components/VirtualizedList.d.ts +6 -0
- package/dist/typescript/module/src/components/VirtualizedList.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.cts +2 -0
- package/dist/typescript/module/src/components/index.d.cts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +8 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/dist/typescript/module/src/index.d.ts +0 -1
- package/dist/typescript/module/src/index.d.ts.map +1 -1
- 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/metro-transformer.d.ts.map +1 -1
- package/dist/typescript/module/src/metro/override.d.ts +2 -0
- package/dist/typescript/module/src/metro/override.d.ts.map +1 -0
- package/dist/typescript/module/src/metro/resolver.d.ts.map +1 -1
- package/dist/typescript/module/src/native/index.d.ts +1 -1
- package/dist/typescript/module/src/native/index.d.ts.map +1 -1
- package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts +2 -0
- package/dist/typescript/module/src/native/react-native-css-metro-override.d.ts.map +1 -0
- package/dist/typescript/module/src/native/styles/resolve.d.ts.map +1 -1
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts +1 -0
- package/dist/typescript/module/src/native/styles/shorthands/animation.d.ts.map +1 -1
- package/package.json +14 -16
- package/src/compiler/atRules.ts +30 -17
- package/src/compiler/compiler.ts +27 -16
- package/src/compiler/declarations.ts +10 -10
- package/src/compiler/keyframes.ts +2 -2
- package/src/compiler/lightningcss-loader.ts +40 -0
- package/src/compiler/selector-builder.ts +6 -2
- package/src/compiler/stylesheet.ts +5 -7
- package/src/components/ActivityIndicator.tsx +2 -2
- package/src/components/Button.tsx +2 -2
- package/src/components/FlatList.tsx +6 -5
- package/src/components/Image.tsx +2 -2
- package/src/components/ImageBackground.tsx +27 -0
- package/src/components/KeyboardAvoidingView.tsx +24 -0
- package/src/components/Pressable.tsx +17 -0
- package/src/components/ScrollView.tsx +20 -0
- package/src/components/TextInput.tsx +8 -3
- package/src/components/TouchableHighlight.tsx +22 -0
- package/src/components/TouchableOpacity.tsx +22 -0
- package/src/components/TouchableWithoutFeedback.tsx +22 -0
- package/src/components/VirtualizedList.tsx +25 -0
- package/src/components/index.cts +263 -0
- package/src/components/index.ts +17 -0
- package/src/index.ts +0 -2
- package/src/jest/index.ts +2 -1
- package/src/metro/index.ts +7 -165
- package/src/metro/metro-transformer.ts +15 -1
- package/src/metro/override.ts +1 -0
- package/src/metro/resolver.ts +20 -26
- package/src/native/index.ts +1 -2
- package/src/native/styles/calculate-props.ts +1 -1
- package/src/native/styles/resolve.ts +0 -1
- package/src/native/styles/shorthands/animation.ts +10 -2
- package/dist/commonjs/poison.pill.js.map +0 -1
- package/dist/commonjs/runtime/native/injection.js +0 -2
- package/dist/commonjs/runtime/native/injection.js.map +0 -1
- package/dist/module/native/metro.js +0 -5
- package/dist/module/poison.pill.js.map +0 -1
- package/dist/module/runtime/native/injection.js +0 -2
- package/dist/module/runtime/native/injection.js.map +0 -1
- package/dist/typescript/commonjs/src/native/metro.d.ts +0 -2
- package/dist/typescript/commonjs/src/native/metro.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/poison.pill.d.ts +0 -2
- package/dist/typescript/commonjs/src/poison.pill.d.ts.map +0 -1
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts +0 -1
- package/dist/typescript/commonjs/src/runtime/native/injection.d.ts.map +0 -1
- package/dist/typescript/module/src/native/metro.d.ts +0 -2
- package/dist/typescript/module/src/native/metro.d.ts.map +0 -1
- package/dist/typescript/module/src/poison.pill.d.ts +0 -2
- package/dist/typescript/module/src/poison.pill.d.ts.map +0 -1
- package/dist/typescript/module/src/runtime/native/injection.d.ts +0 -1
- package/dist/typescript/module/src/runtime/native/injection.d.ts.map +0 -1
- package/src/components/index.tsx +0 -10
- package/src/native/metro.ts +0 -2
- package/src/runtime/native/injection.ts +0 -0
- /package/src/{poison.pill.ts → native/react-native-css-metro-override.ts} +0 -0
|
@@ -20,11 +20,11 @@ function maybeMutateReactNativeOptions(rule, _builder) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/***********************************************
|
|
23
|
-
* @
|
|
23
|
+
* @nativeMapping *
|
|
24
24
|
***********************************************/
|
|
25
25
|
|
|
26
|
-
function
|
|
27
|
-
return rule.type === "unknown" && rule.value.name === "
|
|
26
|
+
function isNativeMappingAtRule(rule) {
|
|
27
|
+
return rule.type === "unknown" && rule.value.name === "nativeMapping";
|
|
28
28
|
}
|
|
29
29
|
function parsePropAtRule(rules) {
|
|
30
30
|
// Include any default mapping here
|
|
@@ -41,12 +41,12 @@ function parsePropAtRule(rules) {
|
|
|
41
41
|
};
|
|
42
42
|
if (!rules) return mapping;
|
|
43
43
|
for (const rule of rules) {
|
|
44
|
-
if (!
|
|
44
|
+
if (!isNativeMappingAtRule(rule)) continue;
|
|
45
45
|
if (rule.value.prelude.length > 0) {
|
|
46
46
|
const prelude = rule.value.prelude.filter(item => {
|
|
47
47
|
return item.value.type !== "white-space";
|
|
48
48
|
});
|
|
49
|
-
|
|
49
|
+
nativeMappingAtRuleBlock(prelude, mapping);
|
|
50
50
|
} else if (rule.value.block) {
|
|
51
51
|
// Remove all whitespace tokens
|
|
52
52
|
const blocks = rule.value.block.filter(item => {
|
|
@@ -58,37 +58,51 @@ function parsePropAtRule(rules) {
|
|
|
58
58
|
return item.value.type === "semicolon";
|
|
59
59
|
});
|
|
60
60
|
for (const block of blockRules) {
|
|
61
|
-
|
|
61
|
+
nativeMappingAtRuleBlock(block, mapping);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return mapping;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
67
|
+
function nativeMappingAtRuleBlock(token, mapping = {}) {
|
|
68
|
+
let [from, to] = (0, _splitByDelimiter.splitByDelimiter)(token, item => {
|
|
69
69
|
return item.value.type === "colon";
|
|
70
70
|
});
|
|
71
|
-
|
|
71
|
+
|
|
72
|
+
// @nativeMapping <to>; (has no from value)
|
|
73
|
+
if (!to) {
|
|
74
|
+
to = from;
|
|
75
|
+
from = [{
|
|
76
|
+
type: "token",
|
|
77
|
+
value: {
|
|
78
|
+
type: "ident",
|
|
79
|
+
value: "*"
|
|
80
|
+
}
|
|
81
|
+
}];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// We can only map from a single property
|
|
85
|
+
if (!from || from.length !== 1 || !to) {
|
|
72
86
|
return mapping;
|
|
73
87
|
}
|
|
74
88
|
const fromToken = from[0];
|
|
75
89
|
if (!fromToken || fromToken.value.type !== "ident") {
|
|
76
90
|
return mapping;
|
|
77
91
|
}
|
|
78
|
-
|
|
79
|
-
mapping["*"] = (0, _selectors.toRNProperty)(fromToken.value.value);
|
|
80
|
-
return mapping;
|
|
81
|
-
}
|
|
82
|
-
mapping[(0, _selectors.toRNProperty)(fromToken.value.value)] = to.flatMap((item, index) => {
|
|
92
|
+
let value = to.flatMap((item, index) => {
|
|
83
93
|
switch (item.value.type) {
|
|
84
94
|
case "delim":
|
|
85
|
-
return index === 0 && item.value.value === "
|
|
95
|
+
return index === 0 && item.value.value === "&" ? ["&"] : [];
|
|
86
96
|
case "ident":
|
|
87
|
-
return
|
|
97
|
+
return item.value.value.split(".").map(part => (0, _selectors.toRNProperty)(part));
|
|
88
98
|
default:
|
|
89
99
|
return [];
|
|
90
100
|
}
|
|
91
101
|
});
|
|
102
|
+
if (value.length === 2 && value[0] === "&" && value[1]) {
|
|
103
|
+
value = value[1];
|
|
104
|
+
}
|
|
105
|
+
mapping[(0, _selectors.toRNProperty)(fromToken.value.value)] = value;
|
|
92
106
|
return mapping;
|
|
93
107
|
}
|
|
94
108
|
//# sourceMappingURL=atRules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_selectors","require","_splitByDelimiter","maybeMutateReactNativeOptions","rule","_builder","type","value","name","
|
|
1
|
+
{"version":3,"names":["_selectors","require","_splitByDelimiter","maybeMutateReactNativeOptions","rule","_builder","type","value","name","isNativeMappingAtRule","parsePropAtRule","rules","mapping","prelude","length","filter","item","nativeMappingAtRuleBlock","block","blocks","blockRules","splitByDelimiter","token","from","to","fromToken","flatMap","index","split","map","part","toRNProperty"],"sourceRoot":"../../../src","sources":["compiler/atRules.ts"],"mappings":";;;;;;;AAQA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAYA;AACA;AACA;;AAcO,SAASE,6BAA6BA,CAC3CC,IAA8B,EAC9BC,QAA2B,EAC3B;EACA,IAAID,IAAI,CAACE,IAAI,KAAK,QAAQ,IAAIF,IAAI,CAACG,KAAK,EAAEC,IAAI,KAAK,cAAc,EAAE;IACjE;EACF;;EAEA;AACF;;AAEA;AACA;AACA;;AAEA,SAASC,qBAAqBA,CAACL,IAAuB,EAAsB;EAC1E,OAAOA,IAAI,CAACE,IAAI,KAAK,SAAS,IAAIF,IAAI,CAACG,KAAK,CAACC,IAAI,KAAK,eAAe;AACvE;AAEO,SAASE,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,CAAC;IACpD,mBAAmB,EAAE,CAAC,gBAAgB,EAAE,QAAQ,CAAC;IACjD,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,YAAY;EACrD,CAAC;EAED,IAAI,CAACD,KAAK,EAAE,OAA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6
6
|
exports.compile = compile;
|
|
7
7
|
var _nodeUtil = require("node:util");
|
|
8
8
|
var _debug = require("debug");
|
|
9
|
-
var _lightningcss = require("lightningcss");
|
|
10
9
|
var _atRules = require("./atRules.js");
|
|
11
10
|
var _containerQuery = require("./container-query.js");
|
|
12
11
|
var _declarations = require("./declarations.js");
|
|
13
12
|
var _inlineVariables = require("./inline-variables.js");
|
|
14
13
|
var _keyframes = require("./keyframes.js");
|
|
14
|
+
var _lightningcssLoader = require("./lightningcss-loader.js");
|
|
15
15
|
var _mediaQuery = require("./media-query.js");
|
|
16
16
|
var _stylesheet = require("./stylesheet.js");
|
|
17
17
|
var _supports = require("./supports.js");
|
|
@@ -42,6 +42,10 @@ function compile(code, options = {}) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
const builder = new _stylesheet.StylesheetBuilder(options);
|
|
45
|
+
const {
|
|
46
|
+
lightningcss,
|
|
47
|
+
Features
|
|
48
|
+
} = (0, _lightningcssLoader.lightningcssLoader)();
|
|
45
49
|
logger(`Lightningcss first pass`);
|
|
46
50
|
|
|
47
51
|
/**
|
|
@@ -91,10 +95,10 @@ function compile(code, options = {}) {
|
|
|
91
95
|
}
|
|
92
96
|
const {
|
|
93
97
|
code: firstPass
|
|
94
|
-
} = (
|
|
98
|
+
} = lightningcss({
|
|
95
99
|
code: typeof code === "string" ? new TextEncoder().encode(code) : code,
|
|
96
|
-
include:
|
|
97
|
-
exclude:
|
|
100
|
+
include: Features.DoublePositionGradients | Features.ColorFunction,
|
|
101
|
+
exclude: Features.VendorPrefixes,
|
|
98
102
|
visitor: firstPassVisitor,
|
|
99
103
|
filename: options.filename ?? "style.css",
|
|
100
104
|
projectRoot: options.projectRoot ?? process.cwd()
|
|
@@ -136,7 +140,7 @@ function compile(code, options = {}) {
|
|
|
136
140
|
return sheet;
|
|
137
141
|
}
|
|
138
142
|
};
|
|
139
|
-
(
|
|
143
|
+
lightningcss({
|
|
140
144
|
code: firstPass,
|
|
141
145
|
visitor,
|
|
142
146
|
filename: options.filename ?? "style.css",
|
|
@@ -151,7 +155,7 @@ function compile(code, options = {}) {
|
|
|
151
155
|
/**
|
|
152
156
|
* Extracts style declarations and animations from a given CSS rule, based on its type.
|
|
153
157
|
*/
|
|
154
|
-
function extractRule(rule, builder) {
|
|
158
|
+
function extractRule(rule, builder, mapping = {}) {
|
|
155
159
|
// Check the rule's type to determine which extraction function to call
|
|
156
160
|
switch (rule.type) {
|
|
157
161
|
case "keyframes":
|
|
@@ -163,13 +167,13 @@ function extractRule(rule, builder) {
|
|
|
163
167
|
case "container":
|
|
164
168
|
{
|
|
165
169
|
// If the rule is a container, extract it with the `extractedContainer` function
|
|
166
|
-
extractContainer(rule.value, builder);
|
|
170
|
+
extractContainer(rule.value, builder, mapping);
|
|
167
171
|
break;
|
|
168
172
|
}
|
|
169
173
|
case "media":
|
|
170
174
|
{
|
|
171
175
|
// If the rule is a media query, extract it with the `extractMedia` function
|
|
172
|
-
extractMedia(rule.value, builder);
|
|
176
|
+
extractMedia(rule.value, builder, mapping);
|
|
173
177
|
break;
|
|
174
178
|
}
|
|
175
179
|
case "nested-declarations":
|
|
@@ -178,7 +182,9 @@ function extractRule(rule, builder) {
|
|
|
178
182
|
const declarationBlock = value.declarations;
|
|
179
183
|
if (declarationBlock) {
|
|
180
184
|
if (declarationBlock.declarations?.length) {
|
|
181
|
-
builder.newNestedRule(
|
|
185
|
+
builder.newNestedRule({
|
|
186
|
+
mapping
|
|
187
|
+
});
|
|
182
188
|
for (const declaration of declarationBlock.declarations) {
|
|
183
189
|
(0, _declarations.parseDeclaration)(declaration, builder);
|
|
184
190
|
}
|
|
@@ -186,6 +192,7 @@ function extractRule(rule, builder) {
|
|
|
186
192
|
}
|
|
187
193
|
if (declarationBlock.importantDeclarations?.length) {
|
|
188
194
|
builder.newNestedRule({
|
|
195
|
+
mapping,
|
|
189
196
|
important: true
|
|
190
197
|
});
|
|
191
198
|
for (const declaration of declarationBlock.importantDeclarations) {
|
|
@@ -200,19 +207,22 @@ function extractRule(rule, builder) {
|
|
|
200
207
|
{
|
|
201
208
|
const value = rule.value;
|
|
202
209
|
const declarationBlock = value.declarations;
|
|
203
|
-
|
|
210
|
+
mapping = {
|
|
211
|
+
...mapping,
|
|
212
|
+
...(0, _atRules.parsePropAtRule)(value.rules)
|
|
213
|
+
};
|
|
204
214
|
|
|
205
215
|
// If the rule is a style declaration, extract it with the `getExtractedStyle` function and store it in the `declarations` map
|
|
206
216
|
builder = builder.fork("style", value.selectors);
|
|
207
217
|
if (declarationBlock) {
|
|
208
|
-
if (declarationBlock.declarations) {
|
|
218
|
+
if (declarationBlock.declarations?.length) {
|
|
209
219
|
builder.newRule(mapping);
|
|
210
220
|
for (const declaration of declarationBlock.declarations) {
|
|
211
221
|
(0, _declarations.parseDeclaration)(declaration, builder);
|
|
212
222
|
}
|
|
213
223
|
builder.applyRuleToSelectors();
|
|
214
224
|
}
|
|
215
|
-
if (declarationBlock.importantDeclarations) {
|
|
225
|
+
if (declarationBlock.importantDeclarations?.length) {
|
|
216
226
|
builder.newRule(mapping, {
|
|
217
227
|
important: true
|
|
218
228
|
});
|
|
@@ -224,20 +234,20 @@ function extractRule(rule, builder) {
|
|
|
224
234
|
}
|
|
225
235
|
if (value.rules) {
|
|
226
236
|
for (const nestedRule of value.rules) {
|
|
227
|
-
extractRule(nestedRule, builder);
|
|
237
|
+
extractRule(nestedRule, builder, mapping);
|
|
228
238
|
}
|
|
229
239
|
}
|
|
230
240
|
break;
|
|
231
241
|
}
|
|
232
242
|
case "layer-block":
|
|
233
243
|
for (const layerRule of rule.value.rules) {
|
|
234
|
-
extractRule(layerRule, builder);
|
|
244
|
+
extractRule(layerRule, builder, mapping);
|
|
235
245
|
}
|
|
236
246
|
break;
|
|
237
247
|
case "supports":
|
|
238
248
|
if ((0, _supports.supportsConditionValid)(rule.value.condition)) {
|
|
239
249
|
for (const layerRule of rule.value.rules) {
|
|
240
|
-
extractRule(layerRule, builder);
|
|
250
|
+
extractRule(layerRule, builder, mapping);
|
|
241
251
|
}
|
|
242
252
|
}
|
|
243
253
|
break;
|
|
@@ -274,7 +284,7 @@ function extractRule(rule, builder) {
|
|
|
274
284
|
*
|
|
275
285
|
* @returns undefined if no screen media queries are found in the mediaRule, else it returns the extracted styles.
|
|
276
286
|
*/
|
|
277
|
-
function extractMedia(mediaRule, builder) {
|
|
287
|
+
function extractMedia(mediaRule, builder, mapping) {
|
|
278
288
|
builder = builder.fork("media");
|
|
279
289
|
|
|
280
290
|
// Initialize an empty array to store screen media queries
|
|
@@ -301,7 +311,7 @@ function extractMedia(mediaRule, builder) {
|
|
|
301
311
|
|
|
302
312
|
// Iterate over all rules in the mediaRule and extract their styles using the updated CompilerCollection
|
|
303
313
|
for (const rule of mediaRule.rules) {
|
|
304
|
-
extractRule(rule, builder);
|
|
314
|
+
extractRule(rule, builder, mapping);
|
|
305
315
|
}
|
|
306
316
|
}
|
|
307
317
|
|
|
@@ -310,7 +320,7 @@ function extractMedia(mediaRule, builder) {
|
|
|
310
320
|
* @param collection - The CompilerCollection object to use when extracting styles.
|
|
311
321
|
* @param parseOptions - The CssToReactNativeRuntimeOptions object to use when parsing styles.
|
|
312
322
|
*/
|
|
313
|
-
function extractContainer(containerRule, builder) {
|
|
323
|
+
function extractContainer(containerRule, builder, mapping) {
|
|
314
324
|
builder = builder.fork("container");
|
|
315
325
|
|
|
316
326
|
// Iterate over all rules inside the containerRule and extract their styles using the updated CompilerCollection
|
|
@@ -322,7 +332,7 @@ function extractContainer(containerRule, builder) {
|
|
|
322
332
|
}
|
|
323
333
|
builder.addContainerQuery(query);
|
|
324
334
|
for (const rule of containerRule.rules) {
|
|
325
|
-
extractRule(rule, builder);
|
|
335
|
+
extractRule(rule, builder, mapping);
|
|
326
336
|
}
|
|
327
337
|
}
|
|
328
338
|
//# sourceMappingURL=compiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_nodeUtil","require","_debug","
|
|
1
|
+
{"version":3,"names":["_nodeUtil","require","_debug","_atRules","_containerQuery","_declarations","_inlineVariables","_keyframes","_lightningcssLoader","_mediaQuery","_stylesheet","_supports","defaultLogger","debug","compile","code","options","logger","isLoggerEnabled","enabled","Boolean","features","Object","assign","selectorPrefix","startsWith","slice","JSON","stringify","process","env","NODE_ENV","toString","builder","StylesheetBuilder","lightningcss","Features","lightningcssLoader","vars","Map","firstPassVisitor","inlineRem","Length","length","unit","value","round","inlineVariables","exclusionList","exclude","Declaration","decl","property","name","includes","entry","get","count","type","set","StyleSheetExit","sheet","firstPass","TextEncoder","encode","include","DoublePositionGradients","ColorFunction","VendorPrefixes","visitor","filename","projectRoot","cwd","MAX_LOG_SIZE","subarray","customAtRules","body","Rule","rule","maybeMutateReactNativeOptions","rules","inspect","depth","colors","compact","extractRule","stylesheet","getNativeStyleSheet","warnings","getWarnings","mapping","extractKeyFrames","extractContainer","extractMedia","declarationBlock","declarations","newNestedRule","declaration","parseDeclaration","applyRuleToSelectors","importantDeclarations","important","parsePropAtRule","fork","selectors","newRule","nestedRule","layerRule","supportsConditionValid","condition","mediaRule","media","mediaQuery","query","mediaQueries","mediaType","qualifier","push","m","parseMediaQuery","containerRule","parseContainerCondition","n","addContainerQuery"],"sourceRoot":"../../../src","sources":["compiler/compiler.ts"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAUA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AA3BA;;AA6BA,MAAMW,aAAa,GAAG,IAAAC,YAAK,EAAC,2BAA2B,CAAC;;AAExD;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E,IAAAG,uCAAuB,EAACD,aAAa,CAACX,SAAS,EAAE5E,OAAO;EAC7D,CAAC;EAED,IAAIuF,aAAa,CAACnE,IAAI,EAAE;IACtB4D,KAAK,CAACS,CAAC,GAAG,KAAKF,aAAa,CAACnE,IAAI,EAAE;EACrC;EAEApB,OAAO,CAAC0F,iBAAiB,CAACV,KAAK,CAAC;EAEhC,KAAK,MAAMnC,IAAI,IAAI0C,aAAa,CAACxC,KAAK,EAAE;IACtCK,WAAW,CAACP,IAAI,EAAE7C,OAAO,EAAEyD,OAAO,CAAC;EACrC;AACF","ignoreList":[]}
|
|
@@ -1472,8 +1472,8 @@ function parseTextShadow(declaration, builder) {
|
|
|
1472
1472
|
return;
|
|
1473
1473
|
}
|
|
1474
1474
|
builder.addDescriptor("textShadowColor", parseColor(textShadow.color, builder));
|
|
1475
|
-
builder.addDescriptor("
|
|
1476
|
-
builder.addDescriptor("
|
|
1475
|
+
builder.addDescriptor("&.textShadowOffset.width", parseLength(textShadow.xOffset, builder));
|
|
1476
|
+
builder.addDescriptor("&.textShadowOffset.height", parseLength(textShadow.yOffset, builder));
|
|
1477
1477
|
builder.addDescriptor("textShadowRadius", parseLength(textShadow.blur, builder));
|
|
1478
1478
|
}
|
|
1479
1479
|
function parseTextDecorationStyle(declaration, builder) {
|
|
@@ -1717,12 +1717,12 @@ function parseBoxShadow({
|
|
|
1717
1717
|
value
|
|
1718
1718
|
}, builder) {
|
|
1719
1719
|
for (const [index, shadow] of value.entries()) {
|
|
1720
|
-
builder.addDescriptor(
|
|
1721
|
-
builder.addDescriptor(
|
|
1722
|
-
builder.addDescriptor(
|
|
1723
|
-
builder.addDescriptor(
|
|
1724
|
-
builder.addDescriptor(
|
|
1725
|
-
builder.addDescriptor(
|
|
1720
|
+
builder.addDescriptor(`&.boxShadow.[${index}].color`, parseColor(shadow.color, builder));
|
|
1721
|
+
builder.addDescriptor(`&.boxShadow.[${index}].offsetX`, parseLength(shadow.xOffset, builder));
|
|
1722
|
+
builder.addDescriptor(`&.boxShadow.[${index}].offsetY`, parseLength(shadow.yOffset, builder));
|
|
1723
|
+
builder.addDescriptor(`&.boxShadow.[${index}].blurRadius`, parseLength(shadow.blur, builder));
|
|
1724
|
+
builder.addDescriptor(`&.boxShadow.[${index}].spreadDistance`, parseLength(shadow.spread, builder));
|
|
1725
|
+
builder.addDescriptor(`&.boxShadow.[${index}].inset`, shadow.inset ? true : undefined);
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
1728
|
function parseBoxSizing(declaration, builder) {
|
|
@@ -2223,13 +2223,13 @@ function parseGradientItem(item, builder) {
|
|
|
2223
2223
|
}
|
|
2224
2224
|
function parseObjectFit(declaration, builder) {
|
|
2225
2225
|
builder.addMapping({
|
|
2226
|
-
"object-fit": "contentFit"
|
|
2226
|
+
"object-fit": ["contentFit"]
|
|
2227
2227
|
});
|
|
2228
2228
|
builder.addDescriptor("object-fit", parseUnparsed(declaration.value, builder, "object-fit"));
|
|
2229
2229
|
}
|
|
2230
2230
|
function parseObjectPosition(declaration, builder) {
|
|
2231
2231
|
builder.addMapping({
|
|
2232
|
-
"object-position": "contentPosition"
|
|
2232
|
+
"object-position": ["contentPosition"]
|
|
2233
2233
|
});
|
|
2234
2234
|
builder.addDescriptor("object-position", [{}, "join", [parseUnparsed(declaration.value, builder, "object-position"), " "]]);
|
|
2235
2235
|
}
|