@tamagui/fake-react-native 3.0.0-beta.907.1 → 3.0.0-beta.917.1
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 +15 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -24,6 +24,17 @@ const TextAncestorContext = React.createContext(false)
|
|
|
24
24
|
const Animated = {
|
|
25
25
|
createAnimatedComponent: (Component) => Component,
|
|
26
26
|
}
|
|
27
|
+
const Keyboard = {
|
|
28
|
+
addListener: () => ({ remove: () => {} }),
|
|
29
|
+
removeAllListeners: () => {},
|
|
30
|
+
dismiss: () => {},
|
|
31
|
+
}
|
|
32
|
+
const useWindowDimensions = () => ({
|
|
33
|
+
width: 1024,
|
|
34
|
+
height: 768,
|
|
35
|
+
scale: 2,
|
|
36
|
+
fontScale: 1,
|
|
37
|
+
})
|
|
27
38
|
const PanResponder = {
|
|
28
39
|
create: (handlers) => ({ panHandlers: handlers }),
|
|
29
40
|
}
|
|
@@ -60,6 +71,8 @@ function proxyWorm() {
|
|
|
60
71
|
get: () => ({ width: 1024, height: 768 }),
|
|
61
72
|
addEventListener: () => ({ remove: () => {} }),
|
|
62
73
|
},
|
|
74
|
+
useWindowDimensions,
|
|
75
|
+
Keyboard,
|
|
63
76
|
Appearance: {
|
|
64
77
|
getColorScheme: () => 'light',
|
|
65
78
|
addChangeListener: () => {},
|
|
@@ -105,6 +118,8 @@ module.exports.PanResponder = proxy.PanResponder
|
|
|
105
118
|
module.exports.TurboModuleRegistry = proxy.TurboModuleRegistry
|
|
106
119
|
module.exports.processColor = proxy.processColor
|
|
107
120
|
module.exports.Dimensions = proxy.Dimensions
|
|
121
|
+
module.exports.useWindowDimensions = useWindowDimensions
|
|
122
|
+
module.exports.Keyboard = Keyboard
|
|
108
123
|
module.exports.Appearance = proxy.Appearance
|
|
109
124
|
module.exports.codegenNativeCommands = codegenNativeCommands
|
|
110
125
|
module.exports.codegenNativeComponent = codegenNativeComponent
|