@niibase/uniwind 1.0.10 → 1.0.11
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/common/components/{native/react-native-gesture-handler → react-native-gesture-handler}/index.js +17 -17
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BaseButton.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BorderlessButton.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/DrawerLayoutAndroid.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/FlatList.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/GestureHandlerRootView.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Pressable.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/PureNativeButton.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RawButton.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RectButton.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RefreshControl.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/ScrollView.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Switch.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Text.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TextInput.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableNativeFeedback.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableOpacity.js +1 -1
- package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableWithoutFeedback.js +1 -1
- package/dist/common/components/react-native-svg/index.js +14 -0
- package/dist/common/components/{native/react-native-svg → react-native-svg/native}/Svg.js +1 -1
- package/dist/common/components/react-native-svg/web/Svg.js +17 -0
- package/dist/metro/index.cjs +7 -5
- package/dist/metro/index.mjs +5 -3
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler}/index.js +17 -17
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BaseButton.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BorderlessButton.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/DrawerLayoutAndroid.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/FlatList.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/GestureHandlerRootView.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Pressable.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/PureNativeButton.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RawButton.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RectButton.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RefreshControl.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/ScrollView.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Switch.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Text.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TextInput.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableNativeFeedback.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableOpacity.js +1 -1
- package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableWithoutFeedback.js +1 -1
- package/dist/module/components/react-native-svg/index.d.ts +1 -0
- package/dist/module/components/react-native-svg/index.js +10 -0
- package/dist/module/components/{native/react-native-svg → react-native-svg/native}/Svg.js +1 -1
- package/dist/module/components/react-native-svg/web/Svg.d.ts +3 -0
- package/dist/module/components/react-native-svg/web/Svg.js +14 -0
- package/package.json +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler}/index.ts +17 -17
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BaseButton.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BorderlessButton.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/DrawerLayoutAndroid.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/FlatList.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/GestureHandlerRootView.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Pressable.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/PureNativeButton.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RawButton.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RectButton.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RefreshControl.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/ScrollView.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Switch.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Text.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TextInput.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableNativeFeedback.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableOpacity.tsx +1 -1
- package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableWithoutFeedback.tsx +1 -1
- package/src/components/react-native-svg/index.ts +12 -0
- package/src/components/{native/react-native-svg → react-native-svg/native}/Svg.tsx +1 -1
- package/src/components/react-native-svg/web/Svg.tsx +14 -0
- package/src/metro/resolvers.ts +5 -3
- package/dist/common/components/native/react-native-svg/index.js +0 -35
- package/dist/module/components/native/react-native-svg/index.d.ts +0 -3
- package/dist/module/components/native/react-native-svg/index.js +0 -3
- package/src/components/native/react-native-svg/index.ts +0 -5
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler}/index.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BaseButton.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BorderlessButton.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/DrawerLayoutAndroid.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/FlatList.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/GestureHandlerRootView.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Pressable.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/PureNativeButton.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RawButton.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RectButton.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RefreshControl.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/ScrollView.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Switch.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Text.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TextInput.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableNativeFeedback.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableOpacity.d.ts +0 -0
- /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableWithoutFeedback.d.ts +0 -0
- /package/dist/module/components/{native/react-native-svg → react-native-svg/native}/Svg.d.ts +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { TouchableOpacity as RNGHTouchableOpacity } from "react-native-gesture-handler";
|
|
4
|
+
import { useStyle } from "../../native/useStyle.js";
|
|
4
5
|
import { copyComponentProperties } from "../../utils.js";
|
|
5
|
-
import { useStyle } from "../useStyle.js";
|
|
6
6
|
export const TouchableOpacity = copyComponentProperties(
|
|
7
7
|
RNGHTouchableOpacity,
|
|
8
8
|
(props) => {
|
|
@@ -3,8 +3,8 @@ import { useState } from "react";
|
|
|
3
3
|
import {
|
|
4
4
|
TouchableWithoutFeedback as RNGHTouchableWithoutFeedback
|
|
5
5
|
} from "react-native-gesture-handler";
|
|
6
|
+
import { useStyle } from "../../native/useStyle.js";
|
|
6
7
|
import { copyComponentProperties } from "../../utils.js";
|
|
7
|
-
import { useStyle } from "../useStyle.js";
|
|
8
8
|
export const TouchableWithoutFeedback = copyComponentProperties(
|
|
9
9
|
RNGHTouchableWithoutFeedback,
|
|
10
10
|
(props) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Svg as RNSvg } from "react-native-svg";
|
|
3
|
+
import { useStyle } from "../../native/useStyle.js";
|
|
3
4
|
import { copyComponentProperties } from "../../utils.js";
|
|
4
|
-
import { useStyle } from "../useStyle.js";
|
|
5
5
|
export const Svg = copyComponentProperties(RNSvg, (props) => {
|
|
6
6
|
const style = useStyle(props.className);
|
|
7
7
|
return /* @__PURE__ */ jsx(
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Svg as RNSvg } from "react-native-svg";
|
|
3
|
+
import { copyComponentProperties } from "../../utils.js";
|
|
4
|
+
import { toRNWClassName } from "../../web/rnw.js";
|
|
5
|
+
export const Svg = copyComponentProperties(RNSvg, (props) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
RNSvg,
|
|
8
|
+
{
|
|
9
|
+
...props,
|
|
10
|
+
style: [toRNWClassName(props.className), props.style]
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
export default Svg;
|
package/package.json
CHANGED
package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler}/index.ts
RENAMED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
get BaseButton() {
|
|
3
|
-
return require('./BaseButton').BaseButton
|
|
3
|
+
return require('./native/BaseButton').BaseButton
|
|
4
4
|
},
|
|
5
5
|
get BorderlessButton() {
|
|
6
|
-
return require('./BorderlessButton').BorderlessButton
|
|
6
|
+
return require('./native/BorderlessButton').BorderlessButton
|
|
7
7
|
},
|
|
8
8
|
get DrawerLayoutAndroid() {
|
|
9
|
-
return require('./DrawerLayoutAndroid').DrawerLayoutAndroid
|
|
9
|
+
return require('./native/DrawerLayoutAndroid').DrawerLayoutAndroid
|
|
10
10
|
},
|
|
11
11
|
get FlatList() {
|
|
12
|
-
return require('./FlatList').FlatList
|
|
12
|
+
return require('./native/FlatList').FlatList
|
|
13
13
|
},
|
|
14
14
|
get GestureHandlerRootView() {
|
|
15
|
-
return require('./GestureHandlerRootView').GestureHandlerRootView
|
|
15
|
+
return require('./native/GestureHandlerRootView').GestureHandlerRootView
|
|
16
16
|
},
|
|
17
17
|
get Pressable() {
|
|
18
|
-
return require('./Pressable').Pressable
|
|
18
|
+
return require('./native/Pressable').Pressable
|
|
19
19
|
},
|
|
20
20
|
get PureNativeButton() {
|
|
21
|
-
return require('./PureNativeButton').PureNativeButton
|
|
21
|
+
return require('./native/PureNativeButton').PureNativeButton
|
|
22
22
|
},
|
|
23
23
|
get RawButton() {
|
|
24
|
-
return require('./RawButton').RawButton
|
|
24
|
+
return require('./native/RawButton').RawButton
|
|
25
25
|
},
|
|
26
26
|
get RectButton() {
|
|
27
|
-
return require('./RectButton').RectButton
|
|
27
|
+
return require('./native/RectButton').RectButton
|
|
28
28
|
},
|
|
29
29
|
get RefreshControl() {
|
|
30
|
-
return require('./RefreshControl').RefreshControl
|
|
30
|
+
return require('./native/RefreshControl').RefreshControl
|
|
31
31
|
},
|
|
32
32
|
get ScrollView() {
|
|
33
|
-
return require('./ScrollView').ScrollView
|
|
33
|
+
return require('./native/ScrollView').ScrollView
|
|
34
34
|
},
|
|
35
35
|
get Switch() {
|
|
36
|
-
return require('./Switch').Switch
|
|
36
|
+
return require('./native/Switch').Switch
|
|
37
37
|
},
|
|
38
38
|
get Text() {
|
|
39
|
-
return require('./Text').Text
|
|
39
|
+
return require('./native/Text').Text
|
|
40
40
|
},
|
|
41
41
|
get TextInput() {
|
|
42
|
-
return require('./TextInput').TextInput
|
|
42
|
+
return require('./native/TextInput').TextInput
|
|
43
43
|
},
|
|
44
44
|
get TouchableNativeFeedback() {
|
|
45
|
-
return require('./TouchableNativeFeedback').TouchableNativeFeedback
|
|
45
|
+
return require('./native/TouchableNativeFeedback').TouchableNativeFeedback
|
|
46
46
|
},
|
|
47
47
|
get TouchableOpacity() {
|
|
48
|
-
return require('./TouchableOpacity').TouchableOpacity
|
|
48
|
+
return require('./native/TouchableOpacity').TouchableOpacity
|
|
49
49
|
},
|
|
50
50
|
get TouchableWithoutFeedback() {
|
|
51
|
-
return require('./TouchableWithoutFeedback').TouchableWithoutFeedback
|
|
51
|
+
return require('./native/TouchableWithoutFeedback').TouchableWithoutFeedback
|
|
52
52
|
},
|
|
53
53
|
|
|
54
54
|
// Re-export non-component exports from react-native-gesture-handler
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseButton as RNGHBaseButton, BaseButtonProps } from 'react-native-gesture-handler'
|
|
2
|
+
import { useStyle } from '../../native/useStyle'
|
|
2
3
|
import { copyComponentProperties } from '../../utils'
|
|
3
|
-
import { useStyle } from '../useStyle'
|
|
4
4
|
|
|
5
5
|
type BaseButtonPropsWithClassName = BaseButtonProps & { className?: string }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BorderlessButton as RNGHBorderlessButton, BorderlessButtonProps } from 'react-native-gesture-handler'
|
|
2
|
+
import { useStyle } from '../../native/useStyle'
|
|
2
3
|
import { copyComponentProperties } from '../../utils'
|
|
3
|
-
import { useStyle } from '../useStyle'
|
|
4
4
|
|
|
5
5
|
export const BorderlessButton = copyComponentProperties(
|
|
6
6
|
RNGHBorderlessButton,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DrawerLayoutAndroidProps } from 'react-native'
|
|
2
2
|
import { DrawerLayoutAndroid as RNGHDrawerLayoutAndroid } from 'react-native-gesture-handler'
|
|
3
|
+
import { useStyle } from '../../native/useStyle'
|
|
3
4
|
import { copyComponentProperties } from '../../utils'
|
|
4
|
-
import { useStyle } from '../useStyle'
|
|
5
5
|
|
|
6
6
|
export const DrawerLayoutAndroid = copyComponentProperties(
|
|
7
7
|
RNGHDrawerLayoutAndroid,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FlatListProps } from 'react-native'
|
|
2
2
|
import { FlatList as RNGHFlatList } from 'react-native-gesture-handler'
|
|
3
3
|
import { useUniwindAccent } from '../../../hooks'
|
|
4
|
+
import { useStyle } from '../../native/useStyle'
|
|
4
5
|
import { copyComponentProperties } from '../../utils'
|
|
5
|
-
import { useStyle } from '../useStyle'
|
|
6
6
|
|
|
7
7
|
export const FlatList = copyComponentProperties(RNGHFlatList, (props: FlatListProps<unknown>) => {
|
|
8
8
|
const style = useStyle(props.className)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GestureHandlerRootView as RNGestureHandlerRootView } from 'react-native-gesture-handler'
|
|
2
2
|
import { GestureHandlerRootViewProps } from 'react-native-gesture-handler/lib/typescript/components/GestureHandlerRootView'
|
|
3
|
+
import { useStyle } from '../../native/useStyle'
|
|
3
4
|
import { copyComponentProperties } from '../../utils'
|
|
4
|
-
import { useStyle } from '../useStyle'
|
|
5
5
|
|
|
6
6
|
export const GestureHandlerRootView = copyComponentProperties(
|
|
7
7
|
RNGestureHandlerRootView,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Pressable as RNGHPressable, PressableProps } from 'react-native-gesture-handler'
|
|
2
2
|
import { UniwindStore } from '../../../core/native'
|
|
3
|
+
import { useStyle } from '../../native/useStyle'
|
|
3
4
|
import { copyComponentProperties } from '../../utils'
|
|
4
|
-
import { useStyle } from '../useStyle'
|
|
5
5
|
|
|
6
6
|
export const Pressable = copyComponentProperties(RNGHPressable, (props: PressableProps) => {
|
|
7
7
|
const style = useStyle(props.className, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PureNativeButton as RNGHPureNativeButton, RawButtonProps } from 'react-native-gesture-handler'
|
|
2
|
+
import { useStyle } from '../../native/useStyle'
|
|
2
3
|
import { copyComponentProperties } from '../../utils'
|
|
3
|
-
import { useStyle } from '../useStyle'
|
|
4
4
|
|
|
5
5
|
export const PureNativeButton = copyComponentProperties(RNGHPureNativeButton, (props: RawButtonProps) => {
|
|
6
6
|
const style = useStyle(props.className)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RawButton as RNGHRawButton, RawButtonProps } from 'react-native-gesture-handler'
|
|
2
|
+
import { useStyle } from '../../native/useStyle'
|
|
2
3
|
import { copyComponentProperties } from '../../utils'
|
|
3
|
-
import { useStyle } from '../useStyle'
|
|
4
4
|
|
|
5
5
|
export const RawButton = copyComponentProperties(RNGHRawButton, (props: RawButtonProps) => {
|
|
6
6
|
const style = useStyle(props.className)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RectButton as RNGHRectButton, RectButtonProps } from 'react-native-gesture-handler'
|
|
2
|
+
import { useStyle } from '../../native/useStyle'
|
|
2
3
|
import { copyComponentProperties } from '../../utils'
|
|
3
|
-
import { useStyle } from '../useStyle'
|
|
4
4
|
|
|
5
5
|
export const RectButton = copyComponentProperties(RNGHRectButton, (props: RectButtonProps) => {
|
|
6
6
|
const style = useStyle(props.className)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RefreshControlProps } from 'react-native'
|
|
2
2
|
import { RefreshControl as RNGHRefreshControl } from 'react-native-gesture-handler'
|
|
3
3
|
import { useUniwindAccent } from '../../../hooks'
|
|
4
|
+
import { useStyle } from '../../native/useStyle'
|
|
4
5
|
import { copyComponentProperties } from '../../utils'
|
|
5
|
-
import { useStyle } from '../useStyle'
|
|
6
6
|
|
|
7
7
|
export const RefreshControl = copyComponentProperties(RNGHRefreshControl, (props: RefreshControlProps) => {
|
|
8
8
|
const style = useStyle(props.className)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ScrollViewProps } from 'react-native'
|
|
2
2
|
import { ScrollView as RNGHScrollView } from 'react-native-gesture-handler'
|
|
3
3
|
import { useUniwindAccent } from '../../../hooks'
|
|
4
|
+
import { useStyle } from '../../native/useStyle'
|
|
4
5
|
import { copyComponentProperties } from '../../utils'
|
|
5
|
-
import { useStyle } from '../useStyle'
|
|
6
6
|
|
|
7
7
|
export const ScrollView = copyComponentProperties(RNGHScrollView, (props: ScrollViewProps) => {
|
|
8
8
|
const style = useStyle(props.className)
|
|
@@ -2,8 +2,8 @@ import { SwitchProps } from 'react-native'
|
|
|
2
2
|
import { Switch as RNGHSwitch } from 'react-native-gesture-handler'
|
|
3
3
|
import { ComponentState } from '../../../core/types'
|
|
4
4
|
import { useUniwindAccent } from '../../../hooks/useUniwindAccent.native'
|
|
5
|
+
import { useStyle } from '../../native/useStyle'
|
|
5
6
|
import { copyComponentProperties } from '../../utils'
|
|
6
|
-
import { useStyle } from '../useStyle'
|
|
7
7
|
|
|
8
8
|
export const Switch = copyComponentProperties(RNGHSwitch, (props: SwitchProps) => {
|
|
9
9
|
const state = {
|
|
@@ -3,8 +3,8 @@ import { TextProps } from 'react-native'
|
|
|
3
3
|
import { Text as RNGHText } from 'react-native-gesture-handler'
|
|
4
4
|
import { ComponentState } from '../../../core/types'
|
|
5
5
|
import { useUniwindAccent } from '../../../hooks/useUniwindAccent.native'
|
|
6
|
+
import { useStyle } from '../../native/useStyle'
|
|
6
7
|
import { copyComponentProperties } from '../../utils'
|
|
7
|
-
import { useStyle } from '../useStyle'
|
|
8
8
|
|
|
9
9
|
type StyleWithWebkitLineClamp = {
|
|
10
10
|
WebkitLineClamp?: number
|
|
@@ -3,8 +3,8 @@ import { TextInputProps } from 'react-native'
|
|
|
3
3
|
import { TextInput as RNGHTextInput } from 'react-native-gesture-handler'
|
|
4
4
|
import { ComponentState } from '../../../core/types'
|
|
5
5
|
import { useUniwindAccent } from '../../../hooks/useUniwindAccent.native'
|
|
6
|
+
import { useStyle } from '../../native/useStyle'
|
|
6
7
|
import { copyComponentProperties } from '../../utils'
|
|
7
|
-
import { useStyle } from '../useStyle'
|
|
8
8
|
|
|
9
9
|
export const TextInput = copyComponentProperties(RNGHTextInput, (props: TextInputProps) => {
|
|
10
10
|
const [isFocused, setIsFocused] = useState(false)
|
|
@@ -2,8 +2,8 @@ import { useState } from 'react'
|
|
|
2
2
|
import { TouchableNativeFeedbackProps } from 'react-native'
|
|
3
3
|
import { TouchableNativeFeedback as RNGHTouchableNativeFeedback } from 'react-native-gesture-handler'
|
|
4
4
|
import { ComponentState } from '../../../core/types'
|
|
5
|
+
import { useStyle } from '../../native/useStyle'
|
|
5
6
|
import { copyComponentProperties } from '../../utils'
|
|
6
|
-
import { useStyle } from '../useStyle'
|
|
7
7
|
|
|
8
8
|
export const TouchableNativeFeedback = copyComponentProperties(
|
|
9
9
|
RNGHTouchableNativeFeedback,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
2
|
import { TouchableOpacity as RNGHTouchableOpacity, TouchableOpacityProps } from 'react-native-gesture-handler'
|
|
3
3
|
import { ComponentState } from '../../../core/types'
|
|
4
|
+
import { useStyle } from '../../native/useStyle'
|
|
4
5
|
import { copyComponentProperties } from '../../utils'
|
|
5
|
-
import { useStyle } from '../useStyle'
|
|
6
6
|
|
|
7
7
|
export const TouchableOpacity = copyComponentProperties(
|
|
8
8
|
RNGHTouchableOpacity,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
TouchableWithoutFeedbackProps,
|
|
5
5
|
} from 'react-native-gesture-handler'
|
|
6
6
|
import { ComponentState } from '../../../core/types'
|
|
7
|
+
import { useStyle } from '../../native/useStyle'
|
|
7
8
|
import { copyComponentProperties } from '../../utils'
|
|
8
|
-
import { useStyle } from '../useStyle'
|
|
9
9
|
|
|
10
10
|
export const TouchableWithoutFeedback = copyComponentProperties(
|
|
11
11
|
RNGHTouchableWithoutFeedback,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Svg as RNSvg, SvgProps } from 'react-native-svg'
|
|
2
|
+
import { useStyle } from '../../native/useStyle'
|
|
2
3
|
import { copyComponentProperties } from '../../utils'
|
|
3
|
-
import { useStyle } from '../useStyle'
|
|
4
4
|
|
|
5
5
|
export const Svg = copyComponentProperties(RNSvg, (props: SvgProps) => {
|
|
6
6
|
const style = useStyle(props.className)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Svg as RNSvg, SvgProps } from 'react-native-svg'
|
|
2
|
+
import { copyComponentProperties } from '../../utils'
|
|
3
|
+
import { toRNWClassName } from '../../web/rnw'
|
|
4
|
+
|
|
5
|
+
export const Svg = copyComponentProperties(RNSvg, (props: SvgProps) => {
|
|
6
|
+
return (
|
|
7
|
+
<RNSvg
|
|
8
|
+
{...props}
|
|
9
|
+
style={[toRNWClassName(props.className), props.style]}
|
|
10
|
+
/>
|
|
11
|
+
)
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
export default Svg
|
package/src/metro/resolvers.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CustomResolutionContext, CustomResolver } from 'metro-resolver'
|
|
2
2
|
import { basename, resolve, sep } from 'node:path'
|
|
3
|
-
import { name } from '../../package.json'
|
|
3
|
+
import { name as packageName } from '../../package.json'
|
|
4
4
|
|
|
5
5
|
type ResolverConfig = {
|
|
6
6
|
platform: string | null
|
|
@@ -11,8 +11,10 @@ type ResolverConfig = {
|
|
|
11
11
|
|
|
12
12
|
const thisModuleDist = resolve(__dirname, '../../dist')
|
|
13
13
|
const thisModuleSrc = resolve(__dirname, '../../src')
|
|
14
|
+
const nodeModulesPath = resolve(__dirname, '../../../')
|
|
14
15
|
|
|
15
16
|
const isFromThisModule = (filename: string) => filename.startsWith(thisModuleDist) || filename.startsWith(thisModuleSrc)
|
|
17
|
+
const name = basename(nodeModulesPath) === 'node_modules' ? basename(resolve(__dirname, '../../')) : packageName
|
|
16
18
|
|
|
17
19
|
const SUPPORTED_COMPONENTS = [
|
|
18
20
|
'ActivityIndicator',
|
|
@@ -61,11 +63,11 @@ export const nativeResolver = (extraComponents: Record<string, string>) =>
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
if (moduleName === 'react-native-gesture-handler') {
|
|
64
|
-
return resolver(context, `${name}/components/
|
|
66
|
+
return resolver(context, `${name}/components/react-native-gesture-handler`, platform)
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
if (moduleName === 'react-native-svg') {
|
|
68
|
-
return resolver(context, `${name}/components/
|
|
70
|
+
return resolver(context, `${name}/components/react-native-svg`, platform)
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
if (
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
Svg: true
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "Svg", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return _Svg.Svg;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, "default", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () {
|
|
18
|
-
return _Svg.default;
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
var _reactNativeSvg = require("react-native-svg");
|
|
22
|
-
Object.keys(_reactNativeSvg).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
25
|
-
if (key in exports && exports[key] === _reactNativeSvg[key]) return;
|
|
26
|
-
Object.defineProperty(exports, key, {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function () {
|
|
29
|
-
return _reactNativeSvg[key];
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
var _Svg = _interopRequireWildcard(require("./Svg"));
|
|
34
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
35
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/module/components/{native/react-native-svg → react-native-svg/native}/Svg.d.ts
RENAMED
|
File without changes
|