@tamagui/fake-react-native 1.135.4 → 1.135.6
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/index.js +26 -7
- package/index.mjs +57 -0
- package/package.json +8 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const emtpyComponent = () => null
|
|
2
2
|
|
|
3
3
|
function proxyWorm() {
|
|
4
4
|
return new Proxy(
|
|
@@ -9,13 +9,18 @@ function proxyWorm() {
|
|
|
9
9
|
Platform: {
|
|
10
10
|
OS: 'web',
|
|
11
11
|
},
|
|
12
|
-
Image:
|
|
13
|
-
View:
|
|
14
|
-
Text:
|
|
15
|
-
TextInput:
|
|
16
|
-
ScrollView:
|
|
12
|
+
Image: emtpyComponent,
|
|
13
|
+
View: emtpyComponent,
|
|
14
|
+
Text: emtpyComponent,
|
|
15
|
+
TextInput: emtpyComponent,
|
|
16
|
+
ScrollView: emtpyComponent,
|
|
17
17
|
Dimensions: {
|
|
18
|
-
addEventListener(cb) {}
|
|
18
|
+
addEventListener(cb) {},
|
|
19
|
+
},
|
|
20
|
+
Appearance: {
|
|
21
|
+
getColorScheme: () => 'light',
|
|
22
|
+
addChangeListener: () => {},
|
|
23
|
+
removeChangeListener: () => {},
|
|
19
24
|
},
|
|
20
25
|
addPoolingTo() {},
|
|
21
26
|
},
|
|
@@ -29,3 +34,17 @@ function proxyWorm() {
|
|
|
29
34
|
}
|
|
30
35
|
)
|
|
31
36
|
}
|
|
37
|
+
|
|
38
|
+
const proxy = proxyWorm()
|
|
39
|
+
|
|
40
|
+
module.exports = proxy
|
|
41
|
+
module.exports.default = proxy
|
|
42
|
+
module.exports.Platform = proxy.Platform
|
|
43
|
+
module.exports.StyleSheet = proxy.StyleSheet
|
|
44
|
+
module.exports.Image = proxy.Image
|
|
45
|
+
module.exports.View = proxy.View
|
|
46
|
+
module.exports.Text = proxy.Text
|
|
47
|
+
module.exports.TextInput = proxy.TextInput
|
|
48
|
+
module.exports.ScrollView = proxy.ScrollView
|
|
49
|
+
module.exports.Dimensions = proxy.Dimensions
|
|
50
|
+
module.exports.Appearance = proxy.Appearance
|
package/index.mjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const emtpyComponent = () => null
|
|
2
|
+
|
|
3
|
+
function proxyWorm() {
|
|
4
|
+
return new Proxy(
|
|
5
|
+
{
|
|
6
|
+
StyleSheet: {
|
|
7
|
+
create() {},
|
|
8
|
+
},
|
|
9
|
+
Platform: {
|
|
10
|
+
OS: 'web',
|
|
11
|
+
},
|
|
12
|
+
Image: emtpyComponent,
|
|
13
|
+
View: emtpyComponent,
|
|
14
|
+
Text: emtpyComponent,
|
|
15
|
+
TextInput: emtpyComponent,
|
|
16
|
+
ScrollView: emtpyComponent,
|
|
17
|
+
Dimensions: {
|
|
18
|
+
addEventListener(cb) {},
|
|
19
|
+
},
|
|
20
|
+
Appearance: {
|
|
21
|
+
getColorScheme: () => 'light',
|
|
22
|
+
addChangeListener: () => {},
|
|
23
|
+
removeChangeListener: () => {},
|
|
24
|
+
},
|
|
25
|
+
addPoolingTo() {},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
get(target, key) {
|
|
29
|
+
return Reflect.get(target, key) || proxyWorm()
|
|
30
|
+
},
|
|
31
|
+
apply() {
|
|
32
|
+
return proxyWorm()
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const proxy = proxyWorm()
|
|
39
|
+
|
|
40
|
+
// Named exports that can be tree-shaken
|
|
41
|
+
export const Platform = proxy.Platform
|
|
42
|
+
export const StyleSheet = proxy.StyleSheet
|
|
43
|
+
export const Image = proxy.Image
|
|
44
|
+
export const View = proxy.View
|
|
45
|
+
export const Text = proxy.Text
|
|
46
|
+
export const TextInput = proxy.TextInput
|
|
47
|
+
export const ScrollView = proxy.ScrollView
|
|
48
|
+
export const Dimensions = proxy.Dimensions
|
|
49
|
+
export const Pressable = proxy.Pressable
|
|
50
|
+
export const Animated = proxy.Animated
|
|
51
|
+
export const Easing = proxy.Easing
|
|
52
|
+
export const Appearance = proxy.Appearance
|
|
53
|
+
export const findNodeHandle = proxy.findNodeHandle
|
|
54
|
+
export const unstable_batchedUpdates = proxy.unstable_batchedUpdates
|
|
55
|
+
|
|
56
|
+
// Default export
|
|
57
|
+
export default proxy
|
package/package.json
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/fake-react-native",
|
|
3
|
-
"version": "1.135.
|
|
3
|
+
"version": "1.135.6",
|
|
4
4
|
"main": "index.js",
|
|
5
|
+
"module": "index.mjs",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./index.mjs",
|
|
9
|
+
"require": "./index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
5
12
|
"publishConfig": {
|
|
6
13
|
"access": "public"
|
|
7
14
|
},
|