@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.
Files changed (92) hide show
  1. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler}/index.js +17 -17
  2. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BaseButton.js +1 -1
  3. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BorderlessButton.js +1 -1
  4. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/DrawerLayoutAndroid.js +1 -1
  5. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/FlatList.js +1 -1
  6. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/GestureHandlerRootView.js +1 -1
  7. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Pressable.js +1 -1
  8. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/PureNativeButton.js +1 -1
  9. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RawButton.js +1 -1
  10. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RectButton.js +1 -1
  11. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RefreshControl.js +1 -1
  12. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/ScrollView.js +1 -1
  13. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Switch.js +1 -1
  14. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Text.js +1 -1
  15. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TextInput.js +1 -1
  16. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableNativeFeedback.js +1 -1
  17. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableOpacity.js +1 -1
  18. package/dist/common/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableWithoutFeedback.js +1 -1
  19. package/dist/common/components/react-native-svg/index.js +14 -0
  20. package/dist/common/components/{native/react-native-svg → react-native-svg/native}/Svg.js +1 -1
  21. package/dist/common/components/react-native-svg/web/Svg.js +17 -0
  22. package/dist/metro/index.cjs +7 -5
  23. package/dist/metro/index.mjs +5 -3
  24. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler}/index.js +17 -17
  25. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BaseButton.js +1 -1
  26. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BorderlessButton.js +1 -1
  27. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/DrawerLayoutAndroid.js +1 -1
  28. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/FlatList.js +1 -1
  29. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/GestureHandlerRootView.js +1 -1
  30. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Pressable.js +1 -1
  31. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/PureNativeButton.js +1 -1
  32. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RawButton.js +1 -1
  33. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RectButton.js +1 -1
  34. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RefreshControl.js +1 -1
  35. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/ScrollView.js +1 -1
  36. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Switch.js +1 -1
  37. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Text.js +1 -1
  38. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TextInput.js +1 -1
  39. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableNativeFeedback.js +1 -1
  40. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableOpacity.js +1 -1
  41. package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableWithoutFeedback.js +1 -1
  42. package/dist/module/components/react-native-svg/index.d.ts +1 -0
  43. package/dist/module/components/react-native-svg/index.js +10 -0
  44. package/dist/module/components/{native/react-native-svg → react-native-svg/native}/Svg.js +1 -1
  45. package/dist/module/components/react-native-svg/web/Svg.d.ts +3 -0
  46. package/dist/module/components/react-native-svg/web/Svg.js +14 -0
  47. package/package.json +1 -1
  48. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler}/index.ts +17 -17
  49. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BaseButton.tsx +1 -1
  50. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BorderlessButton.tsx +1 -1
  51. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/DrawerLayoutAndroid.tsx +1 -1
  52. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/FlatList.tsx +1 -1
  53. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/GestureHandlerRootView.tsx +1 -1
  54. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Pressable.tsx +1 -1
  55. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/PureNativeButton.tsx +1 -1
  56. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RawButton.tsx +1 -1
  57. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RectButton.tsx +1 -1
  58. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RefreshControl.tsx +1 -1
  59. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/ScrollView.tsx +1 -1
  60. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Switch.tsx +1 -1
  61. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Text.tsx +1 -1
  62. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TextInput.tsx +1 -1
  63. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableNativeFeedback.tsx +1 -1
  64. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableOpacity.tsx +1 -1
  65. package/src/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableWithoutFeedback.tsx +1 -1
  66. package/src/components/react-native-svg/index.ts +12 -0
  67. package/src/components/{native/react-native-svg → react-native-svg/native}/Svg.tsx +1 -1
  68. package/src/components/react-native-svg/web/Svg.tsx +14 -0
  69. package/src/metro/resolvers.ts +5 -3
  70. package/dist/common/components/native/react-native-svg/index.js +0 -35
  71. package/dist/module/components/native/react-native-svg/index.d.ts +0 -3
  72. package/dist/module/components/native/react-native-svg/index.js +0 -3
  73. package/src/components/native/react-native-svg/index.ts +0 -5
  74. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler}/index.d.ts +0 -0
  75. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BaseButton.d.ts +0 -0
  76. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/BorderlessButton.d.ts +0 -0
  77. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/DrawerLayoutAndroid.d.ts +0 -0
  78. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/FlatList.d.ts +0 -0
  79. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/GestureHandlerRootView.d.ts +0 -0
  80. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Pressable.d.ts +0 -0
  81. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/PureNativeButton.d.ts +0 -0
  82. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RawButton.d.ts +0 -0
  83. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RectButton.d.ts +0 -0
  84. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/RefreshControl.d.ts +0 -0
  85. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/ScrollView.d.ts +0 -0
  86. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Switch.d.ts +0 -0
  87. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/Text.d.ts +0 -0
  88. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TextInput.d.ts +0 -0
  89. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableNativeFeedback.d.ts +0 -0
  90. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableOpacity.d.ts +0 -0
  91. /package/dist/module/components/{native/react-native-gesture-handler → react-native-gesture-handler/native}/TouchableWithoutFeedback.d.ts +0 -0
  92. /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 {};
@@ -0,0 +1,10 @@
1
+ import * as Svg from "react-native-svg";
2
+ module.exports = {
3
+ ...Svg,
4
+ get Svg() {
5
+ return require("./native/Svg").Svg;
6
+ },
7
+ get default() {
8
+ return require("./native/Svg").default;
9
+ }
10
+ };
@@ -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,3 @@
1
+ import { Svg as RNSvg } from 'react-native-svg';
2
+ export declare const Svg: typeof RNSvg;
3
+ export default Svg;
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@niibase/uniwind",
4
- "version": "1.0.10",
4
+ "version": "1.0.11",
5
5
  "description": "The fastest Tailwind bindings for React Native",
6
6
  "homepage": "https://uniwind.dev",
7
7
  "author": "Unistack",
@@ -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,
@@ -0,0 +1,12 @@
1
+ // Re-export everything from react-native-svg
2
+ import * as Svg from 'react-native-svg'
3
+
4
+ module.exports = {
5
+ ...Svg,
6
+ get Svg() {
7
+ return require('./native/Svg').Svg
8
+ },
9
+ get default() {
10
+ return require('./native/Svg').default
11
+ },
12
+ }
@@ -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
@@ -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/native/react-native-gesture-handler`, platform)
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/native/react-native-svg`, platform)
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; }
@@ -1,3 +0,0 @@
1
- export * from 'react-native-svg';
2
- export { Svg } from './Svg';
3
- export { default } from './Svg';
@@ -1,3 +0,0 @@
1
- export * from "react-native-svg";
2
- export { Svg } from "./Svg.js";
3
- export { default } from "./Svg.js";
@@ -1,5 +0,0 @@
1
- // Re-export everything from react-native-svg
2
- export * from 'react-native-svg'
3
-
4
- export { Svg } from './Svg'
5
- export { default } from './Svg'