@react-navigation/drawer 6.5.8 → 7.0.0-alpha.0

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 (120) hide show
  1. package/lib/commonjs/index.js +4 -6
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/navigators/createDrawerNavigator.js +3 -43
  4. package/lib/commonjs/navigators/createDrawerNavigator.js.map +1 -1
  5. package/lib/commonjs/views/DrawerItem.js +13 -5
  6. package/lib/commonjs/views/DrawerItem.js.map +1 -1
  7. package/lib/commonjs/views/DrawerItemList.js +6 -6
  8. package/lib/commonjs/views/DrawerItemList.js.map +1 -1
  9. package/lib/commonjs/views/DrawerView.js +23 -58
  10. package/lib/commonjs/views/DrawerView.js.map +1 -1
  11. package/lib/module/index.js +1 -3
  12. package/lib/module/index.js.map +1 -1
  13. package/lib/module/navigators/createDrawerNavigator.js +3 -43
  14. package/lib/module/navigators/createDrawerNavigator.js.map +1 -1
  15. package/lib/module/views/DrawerItem.js +14 -6
  16. package/lib/module/views/DrawerItem.js.map +1 -1
  17. package/lib/module/views/DrawerItemList.js +7 -7
  18. package/lib/module/views/DrawerItemList.js.map +1 -1
  19. package/lib/module/views/DrawerView.js +23 -58
  20. package/lib/module/views/DrawerView.js.map +1 -1
  21. package/lib/typescript/src/index.d.ts +1 -3
  22. package/lib/typescript/src/index.d.ts.map +1 -1
  23. package/lib/typescript/src/navigators/createDrawerNavigator.d.ts +8 -3
  24. package/lib/typescript/src/navigators/createDrawerNavigator.d.ts.map +1 -1
  25. package/lib/typescript/src/types.d.ts +20 -14
  26. package/lib/typescript/src/types.d.ts.map +1 -1
  27. package/lib/typescript/src/views/DrawerItem.d.ts +18 -5
  28. package/lib/typescript/src/views/DrawerItem.d.ts.map +1 -1
  29. package/lib/typescript/src/views/DrawerItemList.d.ts +1 -1
  30. package/lib/typescript/src/views/DrawerItemList.d.ts.map +1 -1
  31. package/lib/typescript/src/views/DrawerToggleButton.d.ts +1 -1
  32. package/lib/typescript/src/views/DrawerToggleButton.d.ts.map +1 -1
  33. package/lib/typescript/src/views/DrawerView.d.ts +1 -1
  34. package/lib/typescript/src/views/DrawerView.d.ts.map +1 -1
  35. package/lib/typescript/src/views/ScreenFallback.d.ts +1 -1
  36. package/lib/typescript/src/views/ScreenFallback.d.ts.map +1 -1
  37. package/package.json +14 -14
  38. package/src/index.tsx +5 -3
  39. package/src/navigators/createDrawerNavigator.tsx +2 -72
  40. package/src/types.tsx +8 -1
  41. package/src/views/DrawerItem.tsx +33 -11
  42. package/src/views/DrawerItemList.tsx +5 -4
  43. package/src/views/DrawerView.tsx +17 -68
  44. package/lib/commonjs/utils/DrawerGestureContext.js +0 -12
  45. package/lib/commonjs/utils/DrawerGestureContext.js.map +0 -1
  46. package/lib/commonjs/utils/DrawerProgressContext.js +0 -12
  47. package/lib/commonjs/utils/DrawerProgressContext.js.map +0 -1
  48. package/lib/commonjs/utils/useDrawerProgress.js +0 -19
  49. package/lib/commonjs/utils/useDrawerProgress.js.map +0 -1
  50. package/lib/commonjs/views/GestureHandler.android.js +0 -17
  51. package/lib/commonjs/views/GestureHandler.android.js.map +0 -1
  52. package/lib/commonjs/views/GestureHandler.ios.js +0 -17
  53. package/lib/commonjs/views/GestureHandler.ios.js.map +0 -1
  54. package/lib/commonjs/views/GestureHandler.js +0 -32
  55. package/lib/commonjs/views/GestureHandler.js.map +0 -1
  56. package/lib/commonjs/views/GestureHandlerNative.js +0 -37
  57. package/lib/commonjs/views/GestureHandlerNative.js.map +0 -1
  58. package/lib/commonjs/views/legacy/Drawer.js +0 -419
  59. package/lib/commonjs/views/legacy/Drawer.js.map +0 -1
  60. package/lib/commonjs/views/legacy/Overlay.js +0 -71
  61. package/lib/commonjs/views/legacy/Overlay.js.map +0 -1
  62. package/lib/commonjs/views/modern/Drawer.js +0 -303
  63. package/lib/commonjs/views/modern/Drawer.js.map +0 -1
  64. package/lib/commonjs/views/modern/Overlay.js +0 -66
  65. package/lib/commonjs/views/modern/Overlay.js.map +0 -1
  66. package/lib/module/utils/DrawerGestureContext.js +0 -3
  67. package/lib/module/utils/DrawerGestureContext.js.map +0 -1
  68. package/lib/module/utils/DrawerProgressContext.js +0 -3
  69. package/lib/module/utils/DrawerProgressContext.js.map +0 -1
  70. package/lib/module/utils/useDrawerProgress.js +0 -10
  71. package/lib/module/utils/useDrawerProgress.js.map +0 -1
  72. package/lib/module/views/GestureHandler.android.js +0 -2
  73. package/lib/module/views/GestureHandler.android.js.map +0 -1
  74. package/lib/module/views/GestureHandler.ios.js +0 -2
  75. package/lib/module/views/GestureHandler.ios.js.map +0 -1
  76. package/lib/module/views/GestureHandler.js +0 -20
  77. package/lib/module/views/GestureHandler.js.map +0 -1
  78. package/lib/module/views/GestureHandlerNative.js +0 -11
  79. package/lib/module/views/GestureHandlerNative.js.map +0 -1
  80. package/lib/module/views/legacy/Drawer.js +0 -409
  81. package/lib/module/views/legacy/Drawer.js.map +0 -1
  82. package/lib/module/views/legacy/Overlay.js +0 -61
  83. package/lib/module/views/legacy/Overlay.js.map +0 -1
  84. package/lib/module/views/modern/Drawer.js +0 -294
  85. package/lib/module/views/modern/Drawer.js.map +0 -1
  86. package/lib/module/views/modern/Overlay.js +0 -57
  87. package/lib/module/views/modern/Overlay.js.map +0 -1
  88. package/lib/typescript/src/utils/DrawerGestureContext.d.ts +0 -4
  89. package/lib/typescript/src/utils/DrawerGestureContext.d.ts.map +0 -1
  90. package/lib/typescript/src/utils/DrawerProgressContext.d.ts +0 -5
  91. package/lib/typescript/src/utils/DrawerProgressContext.d.ts.map +0 -1
  92. package/lib/typescript/src/utils/useDrawerProgress.d.ts +0 -3
  93. package/lib/typescript/src/utils/useDrawerProgress.d.ts.map +0 -1
  94. package/lib/typescript/src/views/GestureHandler.android.d.ts +0 -2
  95. package/lib/typescript/src/views/GestureHandler.android.d.ts.map +0 -1
  96. package/lib/typescript/src/views/GestureHandler.d.ts +0 -15
  97. package/lib/typescript/src/views/GestureHandler.d.ts.map +0 -1
  98. package/lib/typescript/src/views/GestureHandler.ios.d.ts +0 -2
  99. package/lib/typescript/src/views/GestureHandler.ios.d.ts.map +0 -1
  100. package/lib/typescript/src/views/GestureHandlerNative.d.ts +0 -6
  101. package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +0 -1
  102. package/lib/typescript/src/views/legacy/Drawer.d.ts +0 -45
  103. package/lib/typescript/src/views/legacy/Drawer.d.ts.map +0 -1
  104. package/lib/typescript/src/views/legacy/Overlay.d.ts +0 -74
  105. package/lib/typescript/src/views/legacy/Overlay.d.ts.map +0 -1
  106. package/lib/typescript/src/views/modern/Drawer.d.ts +0 -4
  107. package/lib/typescript/src/views/modern/Drawer.d.ts.map +0 -1
  108. package/lib/typescript/src/views/modern/Overlay.d.ts +0 -74
  109. package/lib/typescript/src/views/modern/Overlay.d.ts.map +0 -1
  110. package/src/utils/DrawerGestureContext.tsx +0 -3
  111. package/src/utils/DrawerProgressContext.tsx +0 -6
  112. package/src/utils/useDrawerProgress.tsx +0 -18
  113. package/src/views/GestureHandler.android.tsx +0 -1
  114. package/src/views/GestureHandler.ios.tsx +0 -1
  115. package/src/views/GestureHandler.tsx +0 -29
  116. package/src/views/GestureHandlerNative.tsx +0 -24
  117. package/src/views/legacy/Drawer.tsx +0 -671
  118. package/src/views/legacy/Overlay.tsx +0 -75
  119. package/src/views/modern/Drawer.tsx +0 -424
  120. package/src/views/modern/Overlay.tsx +0 -70
@@ -1,294 +0,0 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import * as React from 'react';
3
- import { I18nManager, InteractionManager, Keyboard, Platform, StatusBar, StyleSheet, View } from 'react-native';
4
- import { PanGestureHandler, State as GestureState } from 'react-native-gesture-handler';
5
- import Animated, { interpolate, runOnJS, useAnimatedGestureHandler, useAnimatedStyle, useDerivedValue, useSharedValue, withSpring } from 'react-native-reanimated';
6
- import DrawerProgressContext from '../../utils/DrawerProgressContext';
7
- import Overlay from './Overlay';
8
- const SWIPE_DISTANCE_MINIMUM = 5;
9
- const DEFAULT_DRAWER_WIDTH = '80%';
10
- const minmax = (value, start, end) => {
11
- 'worklet';
12
-
13
- return Math.min(Math.max(value, start), end);
14
- };
15
- export default function Drawer(_ref) {
16
- let {
17
- dimensions,
18
- drawerPosition,
19
- drawerStyle,
20
- drawerType,
21
- gestureHandlerProps,
22
- hideStatusBarOnOpen,
23
- keyboardDismissMode,
24
- onClose,
25
- onOpen,
26
- open,
27
- overlayStyle,
28
- renderDrawerContent,
29
- renderSceneContent,
30
- statusBarAnimation,
31
- swipeDistanceThreshold,
32
- swipeEdgeWidth,
33
- swipeEnabled,
34
- swipeVelocityThreshold
35
- } = _ref;
36
- const getDrawerWidth = () => {
37
- const {
38
- width = DEFAULT_DRAWER_WIDTH
39
- } = StyleSheet.flatten(drawerStyle) || {};
40
- if (typeof width === 'string' && width.endsWith('%')) {
41
- // Try to calculate width if a percentage is given
42
- const percentage = Number(width.replace(/%$/, ''));
43
- if (Number.isFinite(percentage)) {
44
- return dimensions.width * (percentage / 100);
45
- }
46
- }
47
- return typeof width === 'number' ? width : 0;
48
- };
49
- const drawerWidth = getDrawerWidth();
50
- const isOpen = drawerType === 'permanent' ? true : open;
51
- const isRight = drawerPosition === 'right';
52
- const getDrawerTranslationX = React.useCallback(open => {
53
- 'worklet';
54
-
55
- if (drawerPosition === 'left') {
56
- return open ? 0 : -drawerWidth;
57
- }
58
- return open ? 0 : drawerWidth;
59
- }, [drawerPosition, drawerWidth]);
60
- const hideStatusBar = React.useCallback(hide => {
61
- if (hideStatusBarOnOpen) {
62
- StatusBar.setHidden(hide, statusBarAnimation);
63
- }
64
- }, [hideStatusBarOnOpen, statusBarAnimation]);
65
- React.useEffect(() => {
66
- hideStatusBar(isOpen);
67
- return () => hideStatusBar(false);
68
- }, [isOpen, hideStatusBarOnOpen, statusBarAnimation, hideStatusBar]);
69
- const interactionHandleRef = React.useRef(null);
70
- const startInteraction = () => {
71
- interactionHandleRef.current = InteractionManager.createInteractionHandle();
72
- };
73
- const endInteraction = () => {
74
- if (interactionHandleRef.current != null) {
75
- InteractionManager.clearInteractionHandle(interactionHandleRef.current);
76
- interactionHandleRef.current = null;
77
- }
78
- };
79
- const hideKeyboard = () => {
80
- if (keyboardDismissMode === 'on-drag') {
81
- Keyboard.dismiss();
82
- }
83
- };
84
- const onGestureStart = () => {
85
- startInteraction();
86
- hideKeyboard();
87
- hideStatusBar(true);
88
- };
89
- const onGestureFinish = () => {
90
- endInteraction();
91
- };
92
-
93
- // FIXME: Currently hitSlop is broken when on Android when drawer is on right
94
- // https://github.com/software-mansion/react-native-gesture-handler/issues/569
95
- const hitSlop = isRight ?
96
- // Extend hitSlop to the side of the screen when drawer is closed
97
- // This lets the user drag the drawer from the side of the screen
98
- {
99
- right: 0,
100
- width: isOpen ? undefined : swipeEdgeWidth
101
- } : {
102
- left: 0,
103
- width: isOpen ? undefined : swipeEdgeWidth
104
- };
105
- const touchStartX = useSharedValue(0);
106
- const touchX = useSharedValue(0);
107
- const translationX = useSharedValue(getDrawerTranslationX(open));
108
- const gestureState = useSharedValue(GestureState.UNDETERMINED);
109
- const toggleDrawer = React.useCallback(_ref2 => {
110
- 'worklet';
111
-
112
- let {
113
- open,
114
- isUserInitiated,
115
- velocity
116
- } = _ref2;
117
- const translateX = getDrawerTranslationX(open);
118
- touchStartX.value = 0;
119
- touchX.value = 0;
120
- translationX.value = withSpring(translateX, {
121
- velocity,
122
- stiffness: 1000,
123
- damping: 500,
124
- mass: 3,
125
- overshootClamping: true,
126
- restDisplacementThreshold: 0.01,
127
- restSpeedThreshold: 0.01
128
- });
129
- if (!isUserInitiated) {
130
- return;
131
- }
132
- if (open) {
133
- runOnJS(onOpen)();
134
- } else {
135
- runOnJS(onClose)();
136
- }
137
- }, [getDrawerTranslationX, onClose, onOpen, touchStartX, touchX, translationX]);
138
- React.useEffect(() => toggleDrawer({
139
- open,
140
- isUserInitiated: false
141
- }), [open, toggleDrawer]);
142
- const onGestureEvent = useAnimatedGestureHandler({
143
- onStart: (event, ctx) => {
144
- ctx.hasCalledOnStart = false;
145
- ctx.startX = translationX.value;
146
- gestureState.value = event.state;
147
- touchStartX.value = event.x;
148
- },
149
- onActive: (event, ctx) => {
150
- touchX.value = event.x;
151
- translationX.value = ctx.startX + event.translationX;
152
- gestureState.value = event.state;
153
-
154
- // onStart will _always_ be called, even when the activation
155
- // criteria isn't met yet. This makes sure onGestureStart is only
156
- // called when the criteria is really met.
157
- if (!ctx.hasCalledOnStart) {
158
- ctx.hasCalledOnStart = true;
159
- runOnJS(onGestureStart)();
160
- }
161
- },
162
- onEnd: event => {
163
- gestureState.value = event.state;
164
- const nextOpen = Math.abs(event.translationX) > SWIPE_DISTANCE_MINIMUM && Math.abs(event.translationX) > swipeVelocityThreshold || Math.abs(event.translationX) > swipeDistanceThreshold ? drawerPosition === 'left' ?
165
- // If swiped to right, open the drawer, otherwise close it
166
- (event.velocityX === 0 ? event.translationX : event.velocityX) > 0 :
167
- // If swiped to left, open the drawer, otherwise close it
168
- (event.velocityX === 0 ? event.translationX : event.velocityX) < 0 : open;
169
- toggleDrawer({
170
- open: nextOpen,
171
- isUserInitiated: true,
172
- velocity: event.velocityX
173
- });
174
- },
175
- onFinish: () => {
176
- runOnJS(onGestureFinish)();
177
- }
178
- });
179
- const translateX = useDerivedValue(() => {
180
- // Comment stolen from react-native-gesture-handler/DrawerLayout
181
- //
182
- // While closing the drawer when user starts gesture outside of its area (in greyed
183
- // out part of the window), we want the drawer to follow only once finger reaches the
184
- // edge of the drawer.
185
- // E.g. on the diagram below drawer is illustrate by X signs and the greyed out area by
186
- // dots. The touch gesture starts at '*' and moves left, touch path is indicated by
187
- // an arrow pointing left
188
- // 1) +---------------+ 2) +---------------+ 3) +---------------+ 4) +---------------+
189
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
190
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
191
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
192
- // |XXXXXXXX|......| |XXXXXXXX|.<-*..| |XXXXXXXX|<--*..| |XXXXX|<-----*..|
193
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
194
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
195
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
196
- // +---------------+ +---------------+ +---------------+ +---------------+
197
- //
198
- // For the above to work properly we define animated value that will keep start position
199
- // of the gesture. Then we use that value to calculate how much we need to subtract from
200
- // the translationX. If the gesture started on the greyed out area we take the distance from the
201
- // edge of the drawer to the start position. Otherwise we don't subtract at all and the
202
- // drawer be pulled back as soon as you start the pan.
203
- //
204
- // This is used only when drawerType is "front"
205
- const touchDistance = drawerType === 'front' && gestureState.value === GestureState.ACTIVE ? minmax(drawerPosition === 'left' ? touchStartX.value - drawerWidth : dimensions.width - drawerWidth - touchStartX.value, 0, dimensions.width) : 0;
206
- const translateX = drawerPosition === 'left' ? minmax(translationX.value + touchDistance, -drawerWidth, 0) : minmax(translationX.value - touchDistance, 0, drawerWidth);
207
- return translateX;
208
- });
209
- const isRTL = I18nManager.getConstants().isRTL;
210
- const drawerAnimatedStyle = useAnimatedStyle(() => {
211
- const distanceFromEdge = dimensions.width - drawerWidth;
212
- return {
213
- transform: drawerType === 'permanent' ?
214
- // Reanimated needs the property to be present, but it results in Browser bug
215
- // https://bugs.chromium.org/p/chromium/issues/detail?id=20574
216
- [] : [{
217
- translateX:
218
- // The drawer stays in place when `drawerType` is `back`
219
- (drawerType === 'back' ? 0 : translateX.value) + (drawerPosition === 'left' ? isRTL ? -distanceFromEdge : 0 : isRTL ? 0 : distanceFromEdge)
220
- }]
221
- };
222
- });
223
- const contentAnimatedStyle = useAnimatedStyle(() => {
224
- return {
225
- transform: drawerType === 'permanent' ?
226
- // Reanimated needs the property to be present, but it results in Browser bug
227
- // https://bugs.chromium.org/p/chromium/issues/detail?id=20574
228
- [] : [{
229
- translateX:
230
- // The screen content stays in place when `drawerType` is `front`
231
- drawerType === 'front' ? 0 : translateX.value + drawerWidth * (drawerPosition === 'left' ? 1 : -1)
232
- }]
233
- };
234
- });
235
- const progress = useDerivedValue(() => {
236
- return drawerType === 'permanent' ? 1 : interpolate(translateX.value, [getDrawerTranslationX(false), getDrawerTranslationX(true)], [0, 1]);
237
- });
238
- return /*#__PURE__*/React.createElement(DrawerProgressContext.Provider, {
239
- value: progress
240
- }, /*#__PURE__*/React.createElement(PanGestureHandler, _extends({
241
- activeOffsetX: [-SWIPE_DISTANCE_MINIMUM, SWIPE_DISTANCE_MINIMUM],
242
- failOffsetY: [-SWIPE_DISTANCE_MINIMUM, SWIPE_DISTANCE_MINIMUM],
243
- hitSlop: hitSlop,
244
- enabled: drawerType !== 'permanent' && swipeEnabled,
245
- onGestureEvent: onGestureEvent
246
- }, gestureHandlerProps), /*#__PURE__*/React.createElement(Animated.View, {
247
- style: [styles.main, {
248
- flexDirection: drawerType === 'permanent' && !isRight ? 'row-reverse' : 'row'
249
- }]
250
- }, /*#__PURE__*/React.createElement(Animated.View, {
251
- style: [styles.content, contentAnimatedStyle]
252
- }, /*#__PURE__*/React.createElement(View, {
253
- accessibilityElementsHidden: isOpen && drawerType !== 'permanent',
254
- importantForAccessibility: isOpen && drawerType !== 'permanent' ? 'no-hide-descendants' : 'auto',
255
- style: styles.content
256
- }, renderSceneContent()), drawerType !== 'permanent' ? /*#__PURE__*/React.createElement(Overlay, {
257
- progress: progress,
258
- onPress: () => toggleDrawer({
259
- open: false,
260
- isUserInitiated: true
261
- }),
262
- style: overlayStyle
263
- }) : null), /*#__PURE__*/React.createElement(Animated.View, {
264
- accessibilityViewIsModal: isOpen && drawerType !== 'permanent',
265
- removeClippedSubviews: Platform.OS !== 'ios',
266
- style: [styles.container, {
267
- position: drawerType === 'permanent' ? 'relative' : 'absolute',
268
- zIndex: drawerType === 'back' ? -1 : 0
269
- }, drawerAnimatedStyle, drawerStyle]
270
- }, renderDrawerContent()))));
271
- }
272
- const styles = StyleSheet.create({
273
- container: {
274
- top: 0,
275
- bottom: 0,
276
- maxWidth: '100%',
277
- width: DEFAULT_DRAWER_WIDTH
278
- },
279
- content: {
280
- flex: 1
281
- },
282
- main: {
283
- flex: 1,
284
- ...Platform.select({
285
- // FIXME: We need to hide `overflowX` on Web so the translated content doesn't show offscreen.
286
- // But adding `overflowX: 'hidden'` prevents content from collapsing the URL bar.
287
- web: null,
288
- default: {
289
- overflow: 'hidden'
290
- }
291
- })
292
- }
293
- });
294
- //# sourceMappingURL=Drawer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","I18nManager","InteractionManager","Keyboard","Platform","StatusBar","StyleSheet","View","PanGestureHandler","State","GestureState","Animated","interpolate","runOnJS","useAnimatedGestureHandler","useAnimatedStyle","useDerivedValue","useSharedValue","withSpring","DrawerProgressContext","Overlay","SWIPE_DISTANCE_MINIMUM","DEFAULT_DRAWER_WIDTH","minmax","value","start","end","Math","min","max","Drawer","dimensions","drawerPosition","drawerStyle","drawerType","gestureHandlerProps","hideStatusBarOnOpen","keyboardDismissMode","onClose","onOpen","open","overlayStyle","renderDrawerContent","renderSceneContent","statusBarAnimation","swipeDistanceThreshold","swipeEdgeWidth","swipeEnabled","swipeVelocityThreshold","getDrawerWidth","width","flatten","endsWith","percentage","Number","replace","isFinite","drawerWidth","isOpen","isRight","getDrawerTranslationX","useCallback","hideStatusBar","hide","setHidden","useEffect","interactionHandleRef","useRef","startInteraction","current","createInteractionHandle","endInteraction","clearInteractionHandle","hideKeyboard","dismiss","onGestureStart","onGestureFinish","hitSlop","right","undefined","left","touchStartX","touchX","translationX","gestureState","UNDETERMINED","toggleDrawer","isUserInitiated","velocity","translateX","stiffness","damping","mass","overshootClamping","restDisplacementThreshold","restSpeedThreshold","onGestureEvent","onStart","event","ctx","hasCalledOnStart","startX","state","x","onActive","onEnd","nextOpen","abs","velocityX","onFinish","touchDistance","ACTIVE","isRTL","getConstants","drawerAnimatedStyle","distanceFromEdge","transform","contentAnimatedStyle","progress","styles","main","flexDirection","content","OS","container","position","zIndex","create","top","bottom","maxWidth","flex","select","web","default","overflow"],"sourceRoot":"../../src","sources":["Drawer.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,WAAW,EACXC,kBAAkB,EAClBC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,IAAI,QACC,cAAc;AACrB,SACEC,iBAAiB,EAEjBC,KAAK,IAAIC,YAAY,QAChB,8BAA8B;AACrC,OAAOC,QAAQ,IACbC,WAAW,EACXC,OAAO,EACPC,yBAAyB,EACzBC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAGhC,OAAOC,qBAAqB,MAAM,mCAAmC;AACrE,OAAOC,OAAO,MAAM,WAAW;AAE/B,MAAMC,sBAAsB,GAAG,CAAC;AAChC,MAAMC,oBAAoB,GAAG,KAAK;AAQlC,MAAMC,MAAM,GAAG,CAACC,KAAa,EAAEC,KAAa,EAAEC,GAAW,KAAK;EAC5D,SAAS;;EAET,OAAOC,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,GAAG,CAACL,KAAK,EAAEC,KAAK,CAAC,EAAEC,GAAG,CAAC;AAC9C,CAAC;AAED,eAAe,SAASI,MAAM,OAmBd;EAAA,IAnBe;IAC7BC,UAAU;IACVC,cAAc;IACdC,WAAW;IACXC,UAAU;IACVC,mBAAmB;IACnBC,mBAAmB;IACnBC,mBAAmB;IACnBC,OAAO;IACPC,MAAM;IACNC,IAAI;IACJC,YAAY;IACZC,mBAAmB;IACnBC,kBAAkB;IAClBC,kBAAkB;IAClBC,sB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B;EACT,CAAC;EACDoG,OAAO,EAAE;IACPS,IAAI,EAAE;EACR,CAAC;EACDX,IAAI,EAAE;IACJW,IAAI,EAAE,CAAC;IACP,GAAG/H,QAAQ,CAACgI,MAAM,CAAC;MACjB;MACA;MACAC,GAAG,EAAE,IAAI;MACTC,OAAO,EAAE;QAAEC,QAAQ,EAAE;MAAS;IAChC,CAAC;EACH;AACF,CAAC,CAAC"}
@@ -1,57 +0,0 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import * as React from 'react';
3
- import { Platform, Pressable, StyleSheet } from 'react-native';
4
- import Animated, { useAnimatedProps, useAnimatedStyle } from 'react-native-reanimated';
5
- const PROGRESS_EPSILON = 0.05;
6
- const Overlay = /*#__PURE__*/React.forwardRef(function Overlay(_ref, ref) {
7
- let {
8
- progress,
9
- onPress,
10
- style,
11
- ...props
12
- } = _ref;
13
- const animatedStyle = useAnimatedStyle(() => {
14
- return {
15
- opacity: progress.value,
16
- // We don't want the user to be able to press through the overlay when drawer is open
17
- // We can send the overlay behind the screen to avoid it
18
- zIndex: progress.value > PROGRESS_EPSILON ? 0 : -1
19
- };
20
- });
21
- const animatedProps = useAnimatedProps(() => {
22
- const active = progress.value > PROGRESS_EPSILON;
23
- return {
24
- pointerEvents: active ? 'auto' : 'none',
25
- accessibilityElementsHidden: !active,
26
- importantForAccessibility: active ? 'auto' : 'no-hide-descendants'
27
- };
28
- });
29
- return /*#__PURE__*/React.createElement(Animated.View, _extends({}, props, {
30
- ref: ref,
31
- style: [styles.overlay, overlayStyle, animatedStyle, style],
32
- animatedProps: animatedProps
33
- }), /*#__PURE__*/React.createElement(Pressable, {
34
- onPress: onPress,
35
- style: styles.pressable
36
- }));
37
- });
38
- const overlayStyle = Platform.select({
39
- web: {
40
- // Disable touch highlight on mobile Safari.
41
- // WebkitTapHighlightColor must be used outside of StyleSheet.create because react-native-web will omit the property.
42
- WebkitTapHighlightColor: 'transparent'
43
- },
44
- default: {}
45
- });
46
- const styles = StyleSheet.create({
47
- overlay: {
48
- ...StyleSheet.absoluteFillObject,
49
- backgroundColor: 'rgba(0, 0, 0, 0.5)'
50
- },
51
- pressable: {
52
- flex: 1,
53
- pointerEvents: 'auto'
54
- }
55
- });
56
- export default Overlay;
57
- //# sourceMappingURL=Overlay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","Platform","Pressable","StyleSheet","Animated","useAnimatedProps","useAnimatedStyle","PROGRESS_EPSILON","Overlay","forwardRef","ref","progress","onPress","style","props","animatedStyle","opacity","value","zIndex","animatedProps","active","pointerEvents","accessibilityElementsHidden","importantForAccessibility","styles","overlay","overlayStyle","pressable","select","web","WebkitTapHighlightColor","default","create","absoluteFillObject","backgroundColor","flex"],"sourceRoot":"../../src","sources":["Overlay.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AAC9D,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,QACX,yBAAyB;AAEhC,MAAMC,gBAAgB,GAAG,IAAI;AAO7B,MAAMC,OAAO,gBAAGR,KAAK,CAACS,UAAU,CAAC,SAASD,OAAO,OAE/CE,GAA6B,EAC7B;EAAA,IAFA;IAAEC,QAAQ;IAAEC,OAAO;IAAEC,KAAK;IAAE,GAAGC;EAAa,CAAC;EAG7C,MAAMC,aAAa,GAAGT,gBAAgB,CAAC,MAAM;IAC3C,OAAO;MACLU,OAAO,EAAEL,QAAQ,CAACM,KAAK;MACvB;MACA;MACAC,MAAM,EAAEP,QAAQ,CAACM,KAAK,GAAGV,gBAAgB,GAAG,CAAC,GAAG,CAAC;IACnD,CAAC;EACH,CAAC,CAAC;EAEF,MAAMY,aAAa,GAAGd,gBAAgB,CAAC,MAAM;IAC3C,MAAMe,MAAM,GAAGT,QAAQ,CAACM,KAAK,GAAGV,gBAAgB;IAEhD,OAAO;MACLc,aAAa,EAAED,MAAM,GAAG,MAAM,GAAG,MAAM;MACvCE,2BAA2B,EAAE,CAACF,MAAM;MACpCG,yBAAyB,EAAEH,MAAM,GAAG,MAAM,GAAG;IAC/C,CAAC;EACH,CAAC,CAAC;EAEF,oBACE,oBAAC,QAAQ,CAAC,IAAI,eACRN,KAAK;IACT,GAAG,EAAEJ,GAAI;IACT,KAAK,EAAE,CAACc,MAAM,CAACC,OAAO,EAAEC,YAAY,EAAEX,aAAa,EAAEF,KAAK,CAAE;IAC5D,aAAa,EAAEM;EAAc,iBAE7B,oBAAC,SAAS;IAAC,OAAO,EAAEP,OAAQ;IAAC,KAAK,EAAEY,MAAM,CAACG;EAAU,EAAG,CAC1C;AAEpB,CAAC,CAAC;AAEF,MAAMD,YAAY,GAAGzB,QAAQ,CAAC2B,MAAM,CAAyB;EAC3DC,GAAG,EAAE;IACH;IACA;IACAC,uBAAuB,EAAE;EAC3B,CAAC;EACDC,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAMP,MAAM,GAAGrB,UAAU,CAAC6B,MAAM,CAAC;EAC/BP,OAAO,EAAE;IACP,GAAGtB,UAAU,CAAC8B,kBAAkB;IAChCC,eAAe,EAAE;EACnB,CAAC;EACDP,SAAS,EAAE;IACTQ,IAAI,EAAE,CAAC;IACPd,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,eAAeb,OAAO"}
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- declare const _default: React.Context<React.RefObject<any> | null>;
3
- export default _default;
4
- //# sourceMappingURL=DrawerGestureContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DrawerGestureContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/DrawerGestureContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;;AAE/B,wBAAsE"}
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import type Animated from 'react-native-reanimated';
3
- declare const _default: React.Context<Readonly<Animated.SharedValue<number>> | Animated.Node<number> | undefined>;
4
- export default _default;
5
- //# sourceMappingURL=DrawerProgressContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DrawerProgressContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/DrawerProgressContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;;AAEpD,wBAEa"}
@@ -1,3 +0,0 @@
1
- import type Animated from 'react-native-reanimated';
2
- export default function useDrawerProgress(): Readonly<Animated.SharedValue<number>> | Animated.Node<number>;
3
- //# sourceMappingURL=useDrawerProgress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDrawerProgress.d.ts","sourceRoot":"","sources":["../../../../src/utils/useDrawerProgress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAIpD,MAAM,CAAC,OAAO,UAAU,iBAAiB,IACrC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,GACtC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAUxB"}
@@ -1,2 +0,0 @@
1
- export * from './GestureHandlerNative';
2
- //# sourceMappingURL=GestureHandler.android.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GestureHandler.android.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.android.tsx"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import { View } from 'react-native';
3
- export declare const PanGestureHandler: React.ComponentType<import("react-native-gesture-handler").PanGestureHandlerProps>;
4
- export declare const TapGestureHandler: React.ComponentType<import("react-native-gesture-handler").TapGestureHandlerProps>;
5
- export declare const GestureHandlerRootView: typeof View;
6
- export declare const GestureState: {
7
- UNDETERMINED: number;
8
- FAILED: number;
9
- BEGAN: number;
10
- CANCELLED: number;
11
- ACTIVE: number;
12
- END: number;
13
- };
14
- export type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';
15
- //# sourceMappingURL=GestureHandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GestureHandler.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAUpC,eAAO,MAAM,iBAAiB,oFAC6B,CAAC;AAE5D,eAAO,MAAM,iBAAiB,oFAC6B,CAAC;AAE5D,eAAO,MAAM,sBAAsB,aAAO,CAAC;AAE3C,eAAO,MAAM,YAAY;;;;;;;CAOxB,CAAC;AAEF,YAAY,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './GestureHandlerNative';
2
- //# sourceMappingURL=GestureHandler.ios.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GestureHandler.ios.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.ios.tsx"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { PanGestureHandlerProperties } from 'react-native-gesture-handler';
3
- export declare function PanGestureHandler(props: PanGestureHandlerProperties): JSX.Element;
4
- export type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';
5
- export { GestureHandlerRootView, State as GestureState, TapGestureHandler, } from 'react-native-gesture-handler';
6
- //# sourceMappingURL=GestureHandlerNative.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GestureHandlerNative.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandlerNative.tsx"],"names":[],"mappings":";AACA,OAAO,EAEL,2BAA2B,EAC5B,MAAM,8BAA8B,CAAC;AAItC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,2BAA2B,eAQnE;AAED,YAAY,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EACL,sBAAsB,EACtB,KAAK,IAAI,YAAY,EACrB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC"}
@@ -1,45 +0,0 @@
1
- import * as React from 'react';
2
- import type { DrawerProps } from '../../types';
3
- export default class DrawerView extends React.Component<DrawerProps> {
4
- componentDidUpdate(prevProps: DrawerProps): void;
5
- componentWillUnmount(): void;
6
- private handleEndInteraction;
7
- private handleStartInteraction;
8
- private getDrawerWidth;
9
- private clock;
10
- private interactionHandle;
11
- private isDrawerTypeFront;
12
- private isOpen;
13
- private nextIsOpen;
14
- private isSwiping;
15
- private initialDrawerWidth;
16
- private gestureState;
17
- private touchX;
18
- private velocityX;
19
- private gestureX;
20
- private offsetX;
21
- private position;
22
- private containerWidth;
23
- private drawerWidth;
24
- private drawerOpacity;
25
- private drawerPosition;
26
- private touchDistanceFromDrawer;
27
- private swipeDistanceThreshold;
28
- private swipeVelocityThreshold;
29
- private currentOpenValue;
30
- private pendingOpenValue;
31
- private isStatusBarHidden;
32
- private manuallyTriggerSpring;
33
- private transitionTo;
34
- private dragX;
35
- private translateX;
36
- private progress;
37
- private handleGestureEvent;
38
- private handleGestureStateChange;
39
- private handleContainerLayout;
40
- private handleDrawerLayout;
41
- private toggleDrawer;
42
- private toggleStatusBar;
43
- render(): JSX.Element;
44
- }
45
- //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../src/views/legacy/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA2D/C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KA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;IAEF,OAAO,CAAC,YAAY,CAQlB;IAEF,OAAO,CAAC,eAAe,CAQrB;IAEF,MAAM;CAmKP"}
@@ -1,74 +0,0 @@
1
- import * as React from 'react';
2
- import Animated from 'react-native-reanimated';
3
- declare const Overlay: React.ForwardRefExoticComponent<{
4
- children?: React.ReactNode | Animated.Node<React.ReactNode>;
5
- removeClippedSubviews?: boolean | Animated.Node<boolean | undefined> | undefined;
6
- hitSlop?: import("react-native").Insets | Animated.Node<import("react-native").Insets | undefined> | undefined;
7
- onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | Animated.Node<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
8
- pointerEvents?: "none" | "auto" | "box-none" | "box-only" | Animated.Node<"none" | "auto" | "box-none" | "box-only" | undefined> | undefined;
9
- testID?: string | Animated.Node<string | undefined> | undefined;
10
- nativeID?: string | Animated.Node<string | undefined> | undefined;
11
- collapsable?: boolean | Animated.Node<boolean | undefined> | undefined;
12
- needsOffscreenAlphaCompositing?: boolean | Animated.Node<boolean | undefined> | undefined;
13
- renderToHardwareTextureAndroid?: boolean | Animated.Node<boolean | undefined> | undefined;
14
- focusable?: boolean | Animated.Node<boolean | undefined> | undefined;
15
- shouldRasterizeIOS?: boolean | Animated.Node<boolean | undefined> | undefined;
16
- isTVSelectable?: boolean | Animated.Node<boolean | undefined> | undefined;
17
- hasTVPreferredFocus?: boolean | Animated.Node<boolean | undefined> | undefined;
18
- tvParallaxProperties?: import("react-native").TVParallaxProperties | Animated.Node<import("react-native").TVParallaxProperties | undefined> | undefined;
19
- tvParallaxShiftDistanceX?: number | Animated.Node<number | undefined> | undefined;
20
- tvParallaxShiftDistanceY?: number | Animated.Node<number | undefined> | undefined;
21
- tvParallaxTiltAngle?: number | Animated.Node<number | undefined> | undefined;
22
- tvParallaxMagnification?: number | Animated.Node<number | undefined> | undefined;
23
- onStartShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.Node<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
24
- onMoveShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.Node<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
25
- onResponderEnd?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
26
- onResponderGrant?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
27
- onResponderReject?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
28
- onResponderMove?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
29
- onResponderRelease?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
30
- onResponderStart?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
31
- onResponderTerminationRequest?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.Node<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
32
- onResponderTerminate?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
33
- onStartShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.Node<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
34
- onMoveShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.Node<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
35
- onTouchStart?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
36
- onTouchMove?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
37
- onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
38
- onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
39
- onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.Node<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
40
- accessible?: boolean | Animated.Node<boolean | undefined> | undefined;
41
- accessibilityActions?: readonly Readonly<{
42
- name: string;
43
- label?: string | undefined;
44
- }>[] | Animated.Node<readonly Readonly<{
45
- name: string;
46
- label?: string | undefined;
47
- }>[] | undefined> | undefined;
48
- accessibilityLabel?: string | Animated.Node<string | undefined> | undefined;
49
- accessibilityRole?: import("react-native").AccessibilityRole | Animated.Node<import("react-native").AccessibilityRole | undefined> | undefined;
50
- accessibilityState?: import("react-native").AccessibilityState | Animated.Node<import("react-native").AccessibilityState | undefined> | undefined;
51
- accessibilityHint?: string | Animated.Node<string | undefined> | undefined;
52
- accessibilityValue?: import("react-native").AccessibilityValue | Animated.Node<import("react-native").AccessibilityValue | undefined> | undefined;
53
- onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | Animated.Node<((event: import("react-native").AccessibilityActionEvent) => void) | undefined> | undefined;
54
- accessibilityLiveRegion?: "none" | "polite" | "assertive" | Animated.Node<"none" | "polite" | "assertive" | undefined> | undefined;
55
- importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | Animated.Node<"auto" | "yes" | "no" | "no-hide-descendants" | undefined> | undefined;
56
- accessibilityElementsHidden?: boolean | Animated.Node<boolean | undefined> | undefined;
57
- accessibilityViewIsModal?: boolean | Animated.Node<boolean | undefined> | undefined;
58
- onAccessibilityEscape?: (() => void) | Animated.Node<(() => void) | undefined> | undefined;
59
- onAccessibilityTap?: (() => void) | Animated.Node<(() => void) | undefined> | undefined;
60
- onMagicTap?: (() => void) | Animated.Node<(() => void) | undefined> | undefined;
61
- accessibilityIgnoresInvertColors?: boolean | Animated.Node<boolean | undefined> | undefined;
62
- } & {
63
- style?: import("react-native").StyleProp<Animated.AnimateStyle<import("react-native").StyleProp<import("react-native").ViewStyle>>>;
64
- } & {
65
- animatedProps?: Partial<Animated.AnimateProps<import("react-native").ViewProps>> | undefined;
66
- layout?: import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").LayoutAnimationFunction | typeof import("react-native-reanimated").BaseAnimationBuilder | undefined;
67
- entering?: import("react-native-reanimated").BaseAnimationBuilder | typeof import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").EntryExitAnimationFunction | import("react-native-reanimated").Keyframe | undefined;
68
- exiting?: import("react-native-reanimated").BaseAnimationBuilder | typeof import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").EntryExitAnimationFunction | import("react-native-reanimated").Keyframe | undefined;
69
- } & {
70
- progress: Animated.Node<number>;
71
- onPress: () => void;
72
- } & React.RefAttributes<Animated.View>>;
73
- export default Overlay;
74
- //# sourceMappingURL=Overlay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../../src/views/legacy/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAoB/C,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAJD,aAAa,CAAC,MAAM,CAAC;aACtB,MAAM,IAAI;uCAkCnB,CAAC;AAqBH,eAAe,OAAO,CAAC"}
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import type { DrawerProps } from '../../types';
3
- export default function Drawer({ dimensions, drawerPosition, drawerStyle, drawerType, gestureHandlerProps, hideStatusBarOnOpen, keyboardDismissMode, onClose, onOpen, open, overlayStyle, renderDrawerContent, renderSceneContent, statusBarAnimation, swipeDistanceThreshold, swipeEdgeWidth, swipeEnabled, swipeVelocityThreshold, }: DrawerProps): JSX.Element;
4
- //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../../src/views/modern/Drawer.tsx"],"names":[],"mappings":";AAyBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAmB/C,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,UAAU,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,sBAAsB,GACvB,EAAE,WAAW,eAmVb"}