react-native-css 0.0.0-nightly.03a4e35 → 0.0.0-nightly.04af4c6
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/declarations.js +10 -10
- package/dist/commonjs/compiler/declarations.js.map +1 -1
- package/dist/commonjs/compiler/stylesheet.js +2 -5
- 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.js +65 -1
- package/dist/commonjs/components/index.js.map +1 -1
- package/dist/commonjs/native/styles/calculate-props.js +1 -1
- package/dist/module/compiler/atRules.js +30 -16
- package/dist/module/compiler/atRules.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/stylesheet.js +2 -5
- 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.js +8 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/native/styles/calculate-props.js +1 -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.ts +8 -0
- package/dist/typescript/commonjs/src/components/index.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 +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.ts +8 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/compiler/atRules.ts +30 -17
- package/src/compiler/declarations.ts +10 -10
- package/src/compiler/stylesheet.ts +3 -5
- 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.tsx +8 -0
- package/src/native/styles/calculate-props.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,OAAO,EAAE,mBAAmB,CAAC,OAAO,YAAY,CAGrD,CAAC;AAEF,wBAAgB,UAAU,CACxB,KAAK,EAAE,WAAW,CAAC,eAAe,EAAE,OAAO,OAAO,CAAC,0FAGpD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { type TextInputProps } from "react-native";
|
|
2
|
-
import { type StyledProps } from "../runtime";
|
|
3
|
-
declare const mapping:
|
|
4
|
-
className: "style";
|
|
5
|
-
};
|
|
1
|
+
import { TextInput as RNTextInput, type TextInputProps } from "react-native";
|
|
2
|
+
import { type StyledConfiguration, type StyledProps } from "../runtime";
|
|
3
|
+
declare const mapping: StyledConfiguration<typeof RNTextInput>;
|
|
6
4
|
export declare function TextInput(props: StyledProps<TextInputProps, typeof mapping>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
7
5
|
export default TextInput;
|
|
8
6
|
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE7E,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,OAAO,EAAE,mBAAmB,CAAC,OAAO,WAAW,CAOpD,CAAC;AAEF,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC,cAAc,EAAE,OAAO,OAAO,CAAC,0FAE3E;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TouchableHighlight as RNTouchableHighlight, type TouchableHighlightProps } from "react-native";
|
|
2
|
+
import { type StyledConfiguration, type StyledProps } from "../runtime";
|
|
3
|
+
declare const mapping: StyledConfiguration<typeof RNTouchableHighlight>;
|
|
4
|
+
export declare function TouchableHighlight(props: StyledProps<TouchableHighlightProps, typeof mapping>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
5
|
+
export default TouchableHighlight;
|
|
6
|
+
//# sourceMappingURL=TouchableHighlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchableHighlight.d.ts","sourceRoot":"","sources":["../../../../../src/components/TouchableHighlight.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,IAAI,oBAAoB,EAC1C,KAAK,uBAAuB,EAC7B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,OAAO,EAAE,mBAAmB,CAAC,OAAO,oBAAoB,CAE7D,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,CAAC,uBAAuB,EAAE,OAAO,OAAO,CAAC,0FAG5D;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TouchableOpacity as RNTouchableOpacity, type TouchableOpacityProps } from "react-native";
|
|
2
|
+
import { type StyledConfiguration, type StyledProps } from "../runtime";
|
|
3
|
+
declare const mapping: StyledConfiguration<typeof RNTouchableOpacity>;
|
|
4
|
+
export declare function TouchableOpacity(props: StyledProps<TouchableOpacityProps, typeof mapping>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
5
|
+
export default TouchableOpacity;
|
|
6
|
+
//# sourceMappingURL=TouchableOpacity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchableOpacity.d.ts","sourceRoot":"","sources":["../../../../../src/components/TouchableOpacity.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,kBAAkB,EACtC,KAAK,qBAAqB,EAC3B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,OAAO,EAAE,mBAAmB,CAAC,OAAO,kBAAkB,CAE3D,CAAC;AAEF,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,WAAW,CAAC,qBAAqB,EAAE,OAAO,OAAO,CAAC,0FAG1D;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TouchableWithoutFeedback as RNTouchableWithoutFeedback, type TouchableWithoutFeedbackProps } from "react-native";
|
|
2
|
+
import { type StyledConfiguration, type StyledProps } from "../runtime";
|
|
3
|
+
declare const mapping: StyledConfiguration<typeof RNTouchableWithoutFeedback>;
|
|
4
|
+
export declare function TouchableWithoutFeedback(props: StyledProps<TouchableWithoutFeedbackProps, typeof mapping>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
5
|
+
export default TouchableWithoutFeedback;
|
|
6
|
+
//# sourceMappingURL=TouchableWithoutFeedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchableWithoutFeedback.d.ts","sourceRoot":"","sources":["../../../../../src/components/TouchableWithoutFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,IAAI,0BAA0B,EACtD,KAAK,6BAA6B,EACnC,MAAM,cAAc,CAAC;AAEtB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,OAAO,EAAE,mBAAmB,CAAC,OAAO,0BAA0B,CAEnE,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,WAAW,CAAC,6BAA6B,EAAE,OAAO,OAAO,CAAC,0FAGlE;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VirtualizedList as RNVirtualizedList, type VirtualizedListProps } from "react-native";
|
|
2
|
+
import { type StyledConfiguration, type StyledProps } from "../runtime";
|
|
3
|
+
declare const mapping: StyledConfiguration<typeof RNVirtualizedList>;
|
|
4
|
+
export declare function VirtualizedList<ItemT>(props: StyledProps<VirtualizedListProps<ItemT>, typeof mapping>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
5
|
+
export default VirtualizedList;
|
|
6
|
+
//# sourceMappingURL=VirtualizedList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VirtualizedList.d.ts","sourceRoot":"","sources":["../../../../../src/components/VirtualizedList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,IAAI,iBAAiB,EACpC,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AAEpB,QAAA,MAAM,OAAO,EAAE,mBAAmB,CAAC,OAAO,iBAAiB,CAK1D,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EACnC,KAAK,EAAE,WAAW,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,OAAO,OAAO,CAAC,0FAGhE;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -3,8 +3,16 @@ export { ActivityIndicator } from "./ActivityIndicator";
|
|
|
3
3
|
export { Button } from "./Button";
|
|
4
4
|
export { FlatList } from "./FlatList";
|
|
5
5
|
export { Image } from "./Image";
|
|
6
|
+
export { ImageBackground } from "./ImageBackground";
|
|
7
|
+
export { KeyboardAvoidingView } from "./KeyboardAvoidingView";
|
|
8
|
+
export { Pressable } from "./Pressable";
|
|
9
|
+
export { ScrollView } from "./ScrollView";
|
|
6
10
|
export { Switch } from "./Switch";
|
|
7
11
|
export { Text } from "./Text";
|
|
8
12
|
export { TextInput } from "./TextInput";
|
|
13
|
+
export { TouchableHighlight } from "./TouchableHighlight";
|
|
14
|
+
export { TouchableOpacity } from "./TouchableOpacity";
|
|
15
|
+
export { TouchableWithoutFeedback } from "./TouchableWithoutFeedback";
|
|
9
16
|
export { View } from "./View";
|
|
17
|
+
export { VirtualizedList } from "./VirtualizedList";
|
|
10
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-css",
|
|
3
|
-
"version": "0.0.0-nightly.
|
|
3
|
+
"version": "0.0.0-nightly.04af4c6",
|
|
4
4
|
"description": "A CSS polyfill for React Native",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -193,8 +193,8 @@
|
|
|
193
193
|
},
|
|
194
194
|
"peerDependencies": {
|
|
195
195
|
"@expo/metro-config": ">=54",
|
|
196
|
-
"react": "19
|
|
197
|
-
"react-native": "0.81
|
|
196
|
+
"react": ">=19",
|
|
197
|
+
"react-native": ">=0.81"
|
|
198
198
|
},
|
|
199
199
|
"devDependencies": {
|
|
200
200
|
"@babel/core": "^7.28.0",
|
package/src/compiler/atRules.ts
CHANGED
|
@@ -47,11 +47,11 @@ export function maybeMutateReactNativeOptions(
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/***********************************************
|
|
50
|
-
* @
|
|
50
|
+
* @nativeMapping *
|
|
51
51
|
***********************************************/
|
|
52
52
|
|
|
53
|
-
function
|
|
54
|
-
return rule.type === "unknown" && rule.value.name === "
|
|
53
|
+
function isNativeMappingAtRule(rule: Rule | PropAtRule): rule is PropAtRule {
|
|
54
|
+
return rule.type === "unknown" && rule.value.name === "nativeMapping";
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
|
|
@@ -71,14 +71,14 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
|
|
|
71
71
|
if (!rules) return mapping;
|
|
72
72
|
|
|
73
73
|
for (const rule of rules) {
|
|
74
|
-
if (!
|
|
74
|
+
if (!isNativeMappingAtRule(rule)) continue;
|
|
75
75
|
|
|
76
76
|
if (rule.value.prelude.length > 0) {
|
|
77
77
|
const prelude = rule.value.prelude.filter((item) => {
|
|
78
78
|
return item.value.type !== "white-space";
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
nativeMappingAtRuleBlock(prelude, mapping);
|
|
82
82
|
} else if (rule.value.block) {
|
|
83
83
|
// Remove all whitespace tokens
|
|
84
84
|
const blocks = rule.value.block.filter((item) => {
|
|
@@ -91,7 +91,7 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
|
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
for (const block of blockRules) {
|
|
94
|
-
|
|
94
|
+
nativeMappingAtRuleBlock(block, mapping);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -99,38 +99,51 @@ export function parsePropAtRule(rules?: (Rule | PropAtRule)[]) {
|
|
|
99
99
|
return mapping;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
function
|
|
102
|
+
function nativeMappingAtRuleBlock(
|
|
103
103
|
token: Extract<TokenOrValue, { type: "token" }>[],
|
|
104
104
|
mapping: StyleRuleMapping = {},
|
|
105
105
|
): StyleRuleMapping {
|
|
106
|
-
|
|
106
|
+
let [from, to] = splitByDelimiter(token, (item) => {
|
|
107
107
|
return item.value.type === "colon";
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
// @nativeMapping <to>; (has no from value)
|
|
111
|
+
if (!to) {
|
|
112
|
+
to = from;
|
|
113
|
+
from = [
|
|
114
|
+
{
|
|
115
|
+
type: "token",
|
|
116
|
+
value: { type: "ident", value: "*" },
|
|
117
|
+
},
|
|
118
|
+
];
|
|
112
119
|
}
|
|
113
120
|
|
|
114
|
-
|
|
115
|
-
if (!
|
|
121
|
+
// We can only map from a single property
|
|
122
|
+
if (!from || from.length !== 1 || !to) {
|
|
116
123
|
return mapping;
|
|
117
124
|
}
|
|
118
125
|
|
|
119
|
-
|
|
120
|
-
|
|
126
|
+
const fromToken = from[0];
|
|
127
|
+
if (!fromToken || fromToken.value.type !== "ident") {
|
|
121
128
|
return mapping;
|
|
122
129
|
}
|
|
123
130
|
|
|
124
|
-
|
|
131
|
+
let value: string | string[] = to.flatMap((item, index) => {
|
|
125
132
|
switch (item.value.type) {
|
|
126
133
|
case "delim":
|
|
127
|
-
return index === 0 && item.value.value === "
|
|
134
|
+
return index === 0 && item.value.value === "&" ? ["&"] : [];
|
|
128
135
|
case "ident":
|
|
129
|
-
return
|
|
136
|
+
return item.value.value.split(".").map((part) => toRNProperty(part));
|
|
130
137
|
default:
|
|
131
138
|
return [];
|
|
132
139
|
}
|
|
133
140
|
});
|
|
134
141
|
|
|
142
|
+
if (value.length === 2 && value[0] === "&" && value[1]) {
|
|
143
|
+
value = value[1];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
mapping[toRNProperty(fromToken.value.value)] = value;
|
|
147
|
+
|
|
135
148
|
return mapping;
|
|
136
149
|
}
|
|
@@ -1984,11 +1984,11 @@ export function parseTextShadow(
|
|
|
1984
1984
|
parseColor(textShadow.color, builder),
|
|
1985
1985
|
);
|
|
1986
1986
|
builder.addDescriptor(
|
|
1987
|
-
"
|
|
1987
|
+
"&.textShadowOffset.width",
|
|
1988
1988
|
parseLength(textShadow.xOffset, builder),
|
|
1989
1989
|
);
|
|
1990
1990
|
builder.addDescriptor(
|
|
1991
|
-
"
|
|
1991
|
+
"&.textShadowOffset.height",
|
|
1992
1992
|
parseLength(textShadow.yOffset, builder),
|
|
1993
1993
|
);
|
|
1994
1994
|
builder.addDescriptor(
|
|
@@ -2374,27 +2374,27 @@ export function parseBoxShadow(
|
|
|
2374
2374
|
) {
|
|
2375
2375
|
for (const [index, shadow] of value.entries()) {
|
|
2376
2376
|
builder.addDescriptor(
|
|
2377
|
-
|
|
2377
|
+
`&.boxShadow.[${index}].color`,
|
|
2378
2378
|
parseColor(shadow.color, builder),
|
|
2379
2379
|
);
|
|
2380
2380
|
builder.addDescriptor(
|
|
2381
|
-
|
|
2381
|
+
`&.boxShadow.[${index}].offsetX`,
|
|
2382
2382
|
parseLength(shadow.xOffset, builder),
|
|
2383
2383
|
);
|
|
2384
2384
|
builder.addDescriptor(
|
|
2385
|
-
|
|
2385
|
+
`&.boxShadow.[${index}].offsetY`,
|
|
2386
2386
|
parseLength(shadow.yOffset, builder),
|
|
2387
2387
|
);
|
|
2388
2388
|
builder.addDescriptor(
|
|
2389
|
-
|
|
2389
|
+
`&.boxShadow.[${index}].blurRadius`,
|
|
2390
2390
|
parseLength(shadow.blur, builder),
|
|
2391
2391
|
);
|
|
2392
2392
|
builder.addDescriptor(
|
|
2393
|
-
|
|
2393
|
+
`&.boxShadow.[${index}].spreadDistance`,
|
|
2394
2394
|
parseLength(shadow.spread, builder),
|
|
2395
2395
|
);
|
|
2396
2396
|
builder.addDescriptor(
|
|
2397
|
-
|
|
2397
|
+
`&.boxShadow.[${index}].inset`,
|
|
2398
2398
|
shadow.inset ? true : undefined,
|
|
2399
2399
|
);
|
|
2400
2400
|
}
|
|
@@ -3088,7 +3088,7 @@ function parseObjectFit(
|
|
|
3088
3088
|
builder: StylesheetBuilder,
|
|
3089
3089
|
) {
|
|
3090
3090
|
builder.addMapping({
|
|
3091
|
-
"object-fit": "contentFit",
|
|
3091
|
+
"object-fit": ["contentFit"],
|
|
3092
3092
|
});
|
|
3093
3093
|
builder.addDescriptor(
|
|
3094
3094
|
"object-fit",
|
|
@@ -3101,7 +3101,7 @@ function parseObjectPosition(
|
|
|
3101
3101
|
builder: StylesheetBuilder,
|
|
3102
3102
|
) {
|
|
3103
3103
|
builder.addMapping({
|
|
3104
|
-
"object-position": "contentPosition",
|
|
3104
|
+
"object-position": ["contentPosition"],
|
|
3105
3105
|
});
|
|
3106
3106
|
builder.addDescriptor("object-position", [
|
|
3107
3107
|
{},
|
|
@@ -56,7 +56,7 @@ export class StylesheetBuilder {
|
|
|
56
56
|
private ruleTemplate: StyleRule = {
|
|
57
57
|
s: [],
|
|
58
58
|
},
|
|
59
|
-
// Any default mapping should be included in the @
|
|
59
|
+
// Any default mapping should be included in the @nativeMapping parsing
|
|
60
60
|
private mapping: StyleRuleMapping = {},
|
|
61
61
|
public descriptorProperty?: string,
|
|
62
62
|
private shared: {
|
|
@@ -403,12 +403,10 @@ export class StylesheetBuilder {
|
|
|
403
403
|
} else {
|
|
404
404
|
forceTuple = true;
|
|
405
405
|
}
|
|
406
|
-
} else if (propPath) {
|
|
407
|
-
forceTuple = true;
|
|
408
|
-
} else {
|
|
409
|
-
propPath = property;
|
|
410
406
|
}
|
|
411
407
|
|
|
408
|
+
propPath ??= property;
|
|
409
|
+
|
|
412
410
|
if (forceTuple && !Array.isArray(propPath)) {
|
|
413
411
|
propPath = [propPath];
|
|
414
412
|
}
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
type StyledProps,
|
|
10
10
|
} from "../runtime";
|
|
11
11
|
|
|
12
|
-
const mapping = {
|
|
12
|
+
const mapping: StyledConfiguration<typeof RNActivityIndicator> = {
|
|
13
13
|
className: {
|
|
14
14
|
target: "style",
|
|
15
15
|
nativeStyleMapping: {
|
|
16
16
|
color: "color",
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
|
|
21
21
|
export function ActivityIndicator(
|
|
22
22
|
props: StyledProps<ActivityIndicatorProps, typeof mapping>,
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
type StyledProps,
|
|
7
7
|
} from "../runtime";
|
|
8
8
|
|
|
9
|
-
const mapping = {
|
|
9
|
+
const mapping: StyledConfiguration<typeof RNButton> = {
|
|
10
10
|
className: {
|
|
11
11
|
target: false,
|
|
12
12
|
nativeStyleMapping: {
|
|
13
13
|
color: "color",
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
|
|
18
18
|
export function Button(props: StyledProps<ButtonProps, typeof mapping>) {
|
|
19
19
|
return useCssElement(RNButton, props, mapping);
|
|
@@ -6,11 +6,12 @@ import {
|
|
|
6
6
|
type StyledProps,
|
|
7
7
|
} from "../runtime";
|
|
8
8
|
|
|
9
|
-
const mapping = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
const mapping: StyledConfiguration<typeof RNFlatList> = {
|
|
10
|
+
ListFooterComponentClassName: "ListFooterComponentStyle",
|
|
11
|
+
ListHeaderComponentClassName: "ListHeaderComponentStyle",
|
|
12
|
+
columnWrapperClassName: "columnWrapperStyle",
|
|
13
|
+
contentContainerClassName: "contentContainerStyle",
|
|
14
|
+
};
|
|
14
15
|
|
|
15
16
|
export function FlatList<ItemT>(
|
|
16
17
|
props: StyledProps<FlatListProps<ItemT>, typeof mapping>,
|
package/src/components/Image.tsx
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
type StyledProps,
|
|
7
7
|
} from "../runtime";
|
|
8
8
|
|
|
9
|
-
const mapping = {
|
|
9
|
+
const mapping: StyledConfiguration<typeof RNImage> = {
|
|
10
10
|
className: "style",
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
|
|
13
13
|
export function Image(props: StyledProps<ImageProps, typeof mapping>) {
|
|
14
14
|
return useCssElement(RNImage, props, mapping);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ImageBackground as RNImageBackground,
|
|
3
|
+
type ImageBackgroundProps,
|
|
4
|
+
} from "react-native";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
useCssElement,
|
|
8
|
+
type StyledConfiguration,
|
|
9
|
+
type StyledProps,
|
|
10
|
+
} from "../runtime";
|
|
11
|
+
|
|
12
|
+
const mapping: StyledConfiguration<typeof RNImageBackground> = {
|
|
13
|
+
className: {
|
|
14
|
+
target: "style",
|
|
15
|
+
nativeStyleMapping: {
|
|
16
|
+
backgroundColor: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export function ImageBackground(
|
|
22
|
+
props: StyledProps<ImageBackgroundProps, typeof mapping>,
|
|
23
|
+
) {
|
|
24
|
+
return useCssElement(RNImageBackground, props, mapping);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default ImageBackground;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
KeyboardAvoidingView as RNKeyboardAvoidingView,
|
|
3
|
+
type KeyboardAvoidingViewProps,
|
|
4
|
+
} from "react-native";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
useCssElement,
|
|
8
|
+
type StyledConfiguration,
|
|
9
|
+
type StyledProps,
|
|
10
|
+
} from "../runtime";
|
|
11
|
+
|
|
12
|
+
const mapping: StyledConfiguration<typeof RNKeyboardAvoidingView> = {
|
|
13
|
+
className: {
|
|
14
|
+
target: "style",
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export function KeyboardAvoidingView(
|
|
19
|
+
props: StyledProps<KeyboardAvoidingViewProps, typeof mapping>,
|
|
20
|
+
) {
|
|
21
|
+
return useCssElement(RNKeyboardAvoidingView, props, mapping);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default KeyboardAvoidingView;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Pressable as RNPressable, type PressableProps } from "react-native";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useCssElement,
|
|
5
|
+
type StyledConfiguration,
|
|
6
|
+
type StyledProps,
|
|
7
|
+
} from "../runtime";
|
|
8
|
+
|
|
9
|
+
const mapping: StyledConfiguration<typeof RNPressable> = {
|
|
10
|
+
className: "style",
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function Pressable(props: StyledProps<PressableProps, typeof mapping>) {
|
|
14
|
+
return useCssElement(RNPressable, props, mapping);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default Pressable;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ScrollView as RNScrollView, type ScrollViewProps } from "react-native";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useCssElement,
|
|
5
|
+
type StyledConfiguration,
|
|
6
|
+
type StyledProps,
|
|
7
|
+
} from "../runtime";
|
|
8
|
+
|
|
9
|
+
const mapping: StyledConfiguration<typeof RNScrollView> = {
|
|
10
|
+
className: "style",
|
|
11
|
+
contentContainerClassName: "contentContainerStyle",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export function ScrollView(
|
|
15
|
+
props: StyledProps<ScrollViewProps, typeof mapping>,
|
|
16
|
+
) {
|
|
17
|
+
return useCssElement(RNScrollView, props, mapping);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default ScrollView;
|
|
@@ -6,9 +6,14 @@ import {
|
|
|
6
6
|
type StyledProps,
|
|
7
7
|
} from "../runtime";
|
|
8
8
|
|
|
9
|
-
const mapping = {
|
|
10
|
-
className:
|
|
11
|
-
|
|
9
|
+
const mapping: StyledConfiguration<typeof RNTextInput> = {
|
|
10
|
+
className: {
|
|
11
|
+
target: "style",
|
|
12
|
+
nativeStyleMapping: {
|
|
13
|
+
textAlign: true,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
12
17
|
|
|
13
18
|
export function TextInput(props: StyledProps<TextInputProps, typeof mapping>) {
|
|
14
19
|
return useCssElement(RNTextInput, props, mapping);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TouchableHighlight as RNTouchableHighlight,
|
|
3
|
+
type TouchableHighlightProps,
|
|
4
|
+
} from "react-native";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
useCssElement,
|
|
8
|
+
type StyledConfiguration,
|
|
9
|
+
type StyledProps,
|
|
10
|
+
} from "../runtime";
|
|
11
|
+
|
|
12
|
+
const mapping: StyledConfiguration<typeof RNTouchableHighlight> = {
|
|
13
|
+
className: "style",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function TouchableHighlight(
|
|
17
|
+
props: StyledProps<TouchableHighlightProps, typeof mapping>,
|
|
18
|
+
) {
|
|
19
|
+
return useCssElement(RNTouchableHighlight, props, mapping);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default TouchableHighlight;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TouchableOpacity as RNTouchableOpacity,
|
|
3
|
+
type TouchableOpacityProps,
|
|
4
|
+
} from "react-native";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
useCssElement,
|
|
8
|
+
type StyledConfiguration,
|
|
9
|
+
type StyledProps,
|
|
10
|
+
} from "../runtime";
|
|
11
|
+
|
|
12
|
+
const mapping: StyledConfiguration<typeof RNTouchableOpacity> = {
|
|
13
|
+
className: "style",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function TouchableOpacity(
|
|
17
|
+
props: StyledProps<TouchableOpacityProps, typeof mapping>,
|
|
18
|
+
) {
|
|
19
|
+
return useCssElement(RNTouchableOpacity, props, mapping);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default TouchableOpacity;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TouchableWithoutFeedback as RNTouchableWithoutFeedback,
|
|
3
|
+
type TouchableWithoutFeedbackProps,
|
|
4
|
+
} from "react-native";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
useCssElement,
|
|
8
|
+
type StyledConfiguration,
|
|
9
|
+
type StyledProps,
|
|
10
|
+
} from "../runtime";
|
|
11
|
+
|
|
12
|
+
const mapping: StyledConfiguration<typeof RNTouchableWithoutFeedback> = {
|
|
13
|
+
className: "style",
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function TouchableWithoutFeedback(
|
|
17
|
+
props: StyledProps<TouchableWithoutFeedbackProps, typeof mapping>,
|
|
18
|
+
) {
|
|
19
|
+
return useCssElement(RNTouchableWithoutFeedback, props, mapping);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default TouchableWithoutFeedback;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
VirtualizedList as RNVirtualizedList,
|
|
3
|
+
type VirtualizedListProps,
|
|
4
|
+
} from "react-native";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
useCssElement,
|
|
8
|
+
type StyledConfiguration,
|
|
9
|
+
type StyledProps,
|
|
10
|
+
} from "../runtime";
|
|
11
|
+
|
|
12
|
+
const mapping: StyledConfiguration<typeof RNVirtualizedList> = {
|
|
13
|
+
className: "style",
|
|
14
|
+
ListFooterComponentClassName: "ListFooterComponentStyle",
|
|
15
|
+
ListHeaderComponentClassName: "ListHeaderComponentStyle",
|
|
16
|
+
contentContainerClassName: "contentContainerStyle",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export function VirtualizedList<ItemT>(
|
|
20
|
+
props: StyledProps<VirtualizedListProps<ItemT>, typeof mapping>,
|
|
21
|
+
) {
|
|
22
|
+
return useCssElement(RNVirtualizedList, props, mapping);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default VirtualizedList;
|
package/src/components/index.tsx
CHANGED
|
@@ -4,7 +4,15 @@ export { ActivityIndicator } from "./ActivityIndicator";
|
|
|
4
4
|
export { Button } from "./Button";
|
|
5
5
|
export { FlatList } from "./FlatList";
|
|
6
6
|
export { Image } from "./Image";
|
|
7
|
+
export { ImageBackground } from "./ImageBackground";
|
|
8
|
+
export { KeyboardAvoidingView } from "./KeyboardAvoidingView";
|
|
9
|
+
export { Pressable } from "./Pressable";
|
|
10
|
+
export { ScrollView } from "./ScrollView";
|
|
7
11
|
export { Switch } from "./Switch";
|
|
8
12
|
export { Text } from "./Text";
|
|
9
13
|
export { TextInput } from "./TextInput";
|
|
14
|
+
export { TouchableHighlight } from "./TouchableHighlight";
|
|
15
|
+
export { TouchableOpacity } from "./TouchableOpacity";
|
|
16
|
+
export { TouchableWithoutFeedback } from "./TouchableWithoutFeedback";
|
|
10
17
|
export { View } from "./View";
|
|
18
|
+
export { VirtualizedList } from "./VirtualizedList";
|