@react-navigation/drawer 6.6.0 → 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 +9 -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 +21 -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 +10 -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 +21 -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 +17 -16
  26. package/lib/typescript/src/types.d.ts.map +1 -1
  27. package/lib/typescript/src/views/DrawerItem.d.ts +10 -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 +4 -3
  41. package/src/views/DrawerItem.tsx +20 -11
  42. package/src/views/DrawerItemList.tsx +5 -4
  43. package/src/views/DrawerView.tsx +15 -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 -420
  59. package/lib/commonjs/views/legacy/Drawer.js.map +0 -1
  60. package/lib/commonjs/views/legacy/Overlay.js +0 -74
  61. package/lib/commonjs/views/legacy/Overlay.js.map +0 -1
  62. package/lib/commonjs/views/modern/Drawer.js +0 -304
  63. package/lib/commonjs/views/modern/Drawer.js.map +0 -1
  64. package/lib/commonjs/views/modern/Overlay.js +0 -69
  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 -410
  81. package/lib/module/views/legacy/Drawer.js.map +0 -1
  82. package/lib/module/views/legacy/Overlay.js +0 -64
  83. package/lib/module/views/legacy/Overlay.js.map +0 -1
  84. package/lib/module/views/modern/Drawer.js +0 -295
  85. package/lib/module/views/modern/Drawer.js.map +0 -1
  86. package/lib/module/views/modern/Overlay.js +0 -60
  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 -75
  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 -75
  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 -672
  118. package/src/views/legacy/Overlay.tsx +0 -87
  119. package/src/views/modern/Drawer.tsx +0 -425
  120. package/src/views/modern/Overlay.tsx +0 -82
@@ -1,295 +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
- overlayAccessibilityLabel
36
- } = _ref;
37
- const getDrawerWidth = () => {
38
- const {
39
- width = DEFAULT_DRAWER_WIDTH
40
- } = StyleSheet.flatten(drawerStyle) || {};
41
- if (typeof width === 'string' && width.endsWith('%')) {
42
- // Try to calculate width if a percentage is given
43
- const percentage = Number(width.replace(/%$/, ''));
44
- if (Number.isFinite(percentage)) {
45
- return dimensions.width * (percentage / 100);
46
- }
47
- }
48
- return typeof width === 'number' ? width : 0;
49
- };
50
- const drawerWidth = getDrawerWidth();
51
- const isOpen = drawerType === 'permanent' ? true : open;
52
- const isRight = drawerPosition === 'right';
53
- const getDrawerTranslationX = React.useCallback(open => {
54
- 'worklet';
55
-
56
- if (drawerPosition === 'left') {
57
- return open ? 0 : -drawerWidth;
58
- }
59
- return open ? 0 : drawerWidth;
60
- }, [drawerPosition, drawerWidth]);
61
- const hideStatusBar = React.useCallback(hide => {
62
- if (hideStatusBarOnOpen) {
63
- StatusBar.setHidden(hide, statusBarAnimation);
64
- }
65
- }, [hideStatusBarOnOpen, statusBarAnimation]);
66
- React.useEffect(() => {
67
- hideStatusBar(isOpen);
68
- return () => hideStatusBar(false);
69
- }, [isOpen, hideStatusBarOnOpen, statusBarAnimation, hideStatusBar]);
70
- const interactionHandleRef = React.useRef(null);
71
- const startInteraction = () => {
72
- interactionHandleRef.current = InteractionManager.createInteractionHandle();
73
- };
74
- const endInteraction = () => {
75
- if (interactionHandleRef.current != null) {
76
- InteractionManager.clearInteractionHandle(interactionHandleRef.current);
77
- interactionHandleRef.current = null;
78
- }
79
- };
80
- const hideKeyboard = () => {
81
- if (keyboardDismissMode === 'on-drag') {
82
- Keyboard.dismiss();
83
- }
84
- };
85
- const onGestureStart = () => {
86
- startInteraction();
87
- hideKeyboard();
88
- hideStatusBar(true);
89
- };
90
- const onGestureFinish = () => {
91
- endInteraction();
92
- };
93
-
94
- // FIXME: Currently hitSlop is broken when on Android when drawer is on right
95
- // https://github.com/software-mansion/react-native-gesture-handler/issues/569
96
- const hitSlop = isRight ?
97
- // Extend hitSlop to the side of the screen when drawer is closed
98
- // This lets the user drag the drawer from the side of the screen
99
- {
100
- right: 0,
101
- width: isOpen ? undefined : swipeEdgeWidth
102
- } : {
103
- left: 0,
104
- width: isOpen ? undefined : swipeEdgeWidth
105
- };
106
- const touchStartX = useSharedValue(0);
107
- const touchX = useSharedValue(0);
108
- const translationX = useSharedValue(getDrawerTranslationX(open));
109
- const gestureState = useSharedValue(GestureState.UNDETERMINED);
110
- const toggleDrawer = React.useCallback(_ref2 => {
111
- 'worklet';
112
-
113
- let {
114
- open,
115
- isUserInitiated,
116
- velocity
117
- } = _ref2;
118
- const translateX = getDrawerTranslationX(open);
119
- touchStartX.value = 0;
120
- touchX.value = 0;
121
- translationX.value = withSpring(translateX, {
122
- velocity,
123
- stiffness: 1000,
124
- damping: 500,
125
- mass: 3,
126
- overshootClamping: true,
127
- restDisplacementThreshold: 0.01,
128
- restSpeedThreshold: 0.01
129
- });
130
- if (!isUserInitiated) {
131
- return;
132
- }
133
- if (open) {
134
- runOnJS(onOpen)();
135
- } else {
136
- runOnJS(onClose)();
137
- }
138
- }, [getDrawerTranslationX, onClose, onOpen, touchStartX, touchX, translationX]);
139
- React.useEffect(() => toggleDrawer({
140
- open,
141
- isUserInitiated: false
142
- }), [open, toggleDrawer]);
143
- const onGestureEvent = useAnimatedGestureHandler({
144
- onStart: (event, ctx) => {
145
- ctx.hasCalledOnStart = false;
146
- ctx.startX = translationX.value;
147
- gestureState.value = event.state;
148
- touchStartX.value = event.x;
149
- },
150
- onActive: (event, ctx) => {
151
- touchX.value = event.x;
152
- translationX.value = ctx.startX + event.translationX;
153
- gestureState.value = event.state;
154
-
155
- // onStart will _always_ be called, even when the activation
156
- // criteria isn't met yet. This makes sure onGestureStart is only
157
- // called when the criteria is really met.
158
- if (!ctx.hasCalledOnStart) {
159
- ctx.hasCalledOnStart = true;
160
- runOnJS(onGestureStart)();
161
- }
162
- },
163
- onEnd: event => {
164
- gestureState.value = event.state;
165
- const nextOpen = Math.abs(event.translationX) > SWIPE_DISTANCE_MINIMUM && Math.abs(event.translationX) > swipeVelocityThreshold || Math.abs(event.translationX) > swipeDistanceThreshold ? drawerPosition === 'left' ?
166
- // If swiped to right, open the drawer, otherwise close it
167
- (event.velocityX === 0 ? event.translationX : event.velocityX) > 0 :
168
- // If swiped to left, open the drawer, otherwise close it
169
- (event.velocityX === 0 ? event.translationX : event.velocityX) < 0 : open;
170
- toggleDrawer({
171
- open: nextOpen,
172
- isUserInitiated: true,
173
- velocity: event.velocityX
174
- });
175
- },
176
- onFinish: () => {
177
- runOnJS(onGestureFinish)();
178
- }
179
- });
180
- const translateX = useDerivedValue(() => {
181
- // Comment stolen from react-native-gesture-handler/DrawerLayout
182
- //
183
- // While closing the drawer when user starts gesture outside of its area (in greyed
184
- // out part of the window), we want the drawer to follow only once finger reaches the
185
- // edge of the drawer.
186
- // E.g. on the diagram below drawer is illustrate by X signs and the greyed out area by
187
- // dots. The touch gesture starts at '*' and moves left, touch path is indicated by
188
- // an arrow pointing left
189
- // 1) +---------------+ 2) +---------------+ 3) +---------------+ 4) +---------------+
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
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
197
- // +---------------+ +---------------+ +---------------+ +---------------+
198
- //
199
- // For the above to work properly we define animated value that will keep start position
200
- // of the gesture. Then we use that value to calculate how much we need to subtract from
201
- // the translationX. If the gesture started on the greyed out area we take the distance from the
202
- // edge of the drawer to the start position. Otherwise we don't subtract at all and the
203
- // drawer be pulled back as soon as you start the pan.
204
- //
205
- // This is used only when drawerType is "front"
206
- const touchDistance = drawerType === 'front' && gestureState.value === GestureState.ACTIVE ? minmax(drawerPosition === 'left' ? touchStartX.value - drawerWidth : dimensions.width - drawerWidth - touchStartX.value, 0, dimensions.width) : 0;
207
- const translateX = drawerPosition === 'left' ? minmax(translationX.value + touchDistance, -drawerWidth, 0) : minmax(translationX.value - touchDistance, 0, drawerWidth);
208
- return translateX;
209
- });
210
- const isRTL = I18nManager.getConstants().isRTL;
211
- const drawerAnimatedStyle = useAnimatedStyle(() => {
212
- const distanceFromEdge = dimensions.width - drawerWidth;
213
- return {
214
- transform: drawerType === 'permanent' ?
215
- // Reanimated needs the property to be present, but it results in Browser bug
216
- // https://bugs.chromium.org/p/chromium/issues/detail?id=20574
217
- [] : [{
218
- translateX:
219
- // The drawer stays in place when `drawerType` is `back`
220
- (drawerType === 'back' ? 0 : translateX.value) + (drawerPosition === 'left' ? isRTL ? -distanceFromEdge : 0 : isRTL ? 0 : distanceFromEdge)
221
- }]
222
- };
223
- });
224
- const contentAnimatedStyle = useAnimatedStyle(() => {
225
- return {
226
- transform: drawerType === 'permanent' ?
227
- // Reanimated needs the property to be present, but it results in Browser bug
228
- // https://bugs.chromium.org/p/chromium/issues/detail?id=20574
229
- [] : [{
230
- translateX:
231
- // The screen content stays in place when `drawerType` is `front`
232
- drawerType === 'front' ? 0 : translateX.value + drawerWidth * (drawerPosition === 'left' ? 1 : -1)
233
- }]
234
- };
235
- });
236
- const progress = useDerivedValue(() => {
237
- return drawerType === 'permanent' ? 1 : interpolate(translateX.value, [getDrawerTranslationX(false), getDrawerTranslationX(true)], [0, 1]);
238
- });
239
- return /*#__PURE__*/React.createElement(DrawerProgressContext.Provider, {
240
- value: progress
241
- }, /*#__PURE__*/React.createElement(PanGestureHandler, _extends({
242
- activeOffsetX: [-SWIPE_DISTANCE_MINIMUM, SWIPE_DISTANCE_MINIMUM],
243
- failOffsetY: [-SWIPE_DISTANCE_MINIMUM, SWIPE_DISTANCE_MINIMUM],
244
- hitSlop: hitSlop,
245
- enabled: drawerType !== 'permanent' && swipeEnabled,
246
- onGestureEvent: onGestureEvent
247
- }, gestureHandlerProps), /*#__PURE__*/React.createElement(Animated.View, {
248
- style: [styles.main, {
249
- flexDirection: drawerType === 'permanent' && !isRight ? 'row-reverse' : 'row'
250
- }]
251
- }, /*#__PURE__*/React.createElement(Animated.View, {
252
- style: [styles.content, contentAnimatedStyle]
253
- }, /*#__PURE__*/React.createElement(View, {
254
- accessibilityElementsHidden: isOpen && drawerType !== 'permanent',
255
- importantForAccessibility: isOpen && drawerType !== 'permanent' ? 'no-hide-descendants' : 'auto',
256
- style: styles.content
257
- }, renderSceneContent()), drawerType !== 'permanent' ? /*#__PURE__*/React.createElement(Overlay, {
258
- progress: progress,
259
- onPress: () => toggleDrawer({
260
- open: false,
261
- isUserInitiated: true
262
- }),
263
- style: overlayStyle,
264
- accessibilityLabel: overlayAccessibilityLabel
265
- }) : null), /*#__PURE__*/React.createElement(Animated.View, {
266
- removeClippedSubviews: Platform.OS !== 'ios',
267
- style: [styles.container, {
268
- position: drawerType === 'permanent' ? 'relative' : 'absolute',
269
- zIndex: drawerType === 'back' ? -1 : 0
270
- }, drawerAnimatedStyle, drawerStyle]
271
- }, renderDrawerContent()))));
272
- }
273
- const styles = StyleSheet.create({
274
- container: {
275
- top: 0,
276
- bottom: 0,
277
- maxWidth: '100%',
278
- width: DEFAULT_DRAWER_WIDTH
279
- },
280
- content: {
281
- flex: 1
282
- },
283
- main: {
284
- flex: 1,
285
- ...Platform.select({
286
- // FIXME: We need to hide `overflowX` on Web so the translated content doesn't show offscreen.
287
- // But adding `overflowX: 'hidden'` prevents content from collapsing the URL bar.
288
- web: null,
289
- default: {
290
- overflow: 'hidden'
291
- }
292
- })
293
- }
294
- });
295
- //# 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","overlayAccessibilityLabel","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,OAoBd;EAAA,IApBe;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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;IAChBhF,KAAK,EAAE7B;EACT,CAAC;EACDqG,OAAO,EAAE;IACPS,IAAI,EAAE;EACR,CAAC;EACDX,IAAI,EAAE;IACJW,IAAI,EAAE,CAAC;IACP,GAAGhI,QAAQ,CAACiI,MAAM,CAAC;MACjB;MACA;MACAC,GAAG,EAAE,IAAI;MACTC,OAAO,EAAE;QAAEC,QAAQ,EAAE;MAAS;IAChC,CAAC;EACH;AACF,CAAC,CAAC"}
@@ -1,60 +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
- accessibilityLabel = 'Close drawer',
12
- ...props
13
- } = _ref;
14
- const animatedStyle = useAnimatedStyle(() => {
15
- return {
16
- opacity: progress.value,
17
- // We don't want the user to be able to press through the overlay when drawer is open
18
- // We can send the overlay behind the screen to avoid it
19
- zIndex: progress.value > PROGRESS_EPSILON ? 0 : -1
20
- };
21
- });
22
- const animatedProps = useAnimatedProps(() => {
23
- const active = progress.value > PROGRESS_EPSILON;
24
- return {
25
- pointerEvents: active ? 'auto' : 'none',
26
- accessibilityElementsHidden: !active,
27
- importantForAccessibility: active ? 'auto' : 'no-hide-descendants'
28
- };
29
- });
30
- return /*#__PURE__*/React.createElement(Animated.View, _extends({}, props, {
31
- ref: ref,
32
- style: [styles.overlay, overlayStyle, animatedStyle, style],
33
- animatedProps: animatedProps
34
- }), /*#__PURE__*/React.createElement(Pressable, {
35
- onPress: onPress,
36
- style: styles.pressable,
37
- accessibilityRole: "button",
38
- accessibilityLabel: accessibilityLabel
39
- }));
40
- });
41
- const overlayStyle = Platform.select({
42
- web: {
43
- // Disable touch highlight on mobile Safari.
44
- // WebkitTapHighlightColor must be used outside of StyleSheet.create because react-native-web will omit the property.
45
- WebkitTapHighlightColor: 'transparent'
46
- },
47
- default: {}
48
- });
49
- const styles = StyleSheet.create({
50
- overlay: {
51
- ...StyleSheet.absoluteFillObject,
52
- backgroundColor: 'rgba(0, 0, 0, 0.5)'
53
- },
54
- pressable: {
55
- flex: 1,
56
- pointerEvents: 'auto'
57
- }
58
- });
59
- export default Overlay;
60
- //# 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","accessibilityLabel","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;AAQ7B,MAAMC,OAAO,gBAAGR,KAAK,CAACS,UAAU,CAAC,SAASD,OAAO,OAQ/CE,GAA6B,EAC7B;EAAA,IARA;IACEC,QAAQ;IACRC,OAAO;IACPC,KAAK;IACLC,kBAAkB,GAAG,cAAc;IACnC,GAAGC;EACE,CAAC;EAGR,MAAMC,aAAa,GAAGV,gBAAgB,CAAC,MAAM;IAC3C,OAAO;MACLW,OAAO,EAAEN,QAAQ,CAACO,KAAK;MACvB;MACA;MACAC,MAAM,EAAER,QAAQ,CAACO,KAAK,GAAGX,gBAAgB,GAAG,CAAC,GAAG,CAAC;IACnD,CAAC;EACH,CAAC,CAAC;EAEF,MAAMa,aAAa,GAAGf,gBAAgB,CAAC,MAAM;IAC3C,MAAMgB,MAAM,GAAGV,QAAQ,CAACO,KAAK,GAAGX,gBAAgB;IAEhD,OAAO;MACLe,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,EAAEL,GAAI;IACT,KAAK,EAAE,CAACe,MAAM,CAACC,OAAO,EAAEC,YAAY,EAAEX,aAAa,EAAEH,KAAK,CAAE;IAC5D,aAAa,EAAEO;EAAc,iBAE7B,oBAAC,SAAS;IACR,OAAO,EAAER,OAAQ;IACjB,KAAK,EAAEa,MAAM,CAACG,SAAU;IACxB,iBAAiB,EAAC,QAAQ;IAC1B,kBAAkB,EAAEd;EAAmB,EACvC,CACY;AAEpB,CAAC,CAAC;AAEF,MAAMa,YAAY,GAAG1B,QAAQ,CAAC4B,MAAM,CAAyB;EAC3DC,GAAG,EAAE;IACH;IACA;IACAC,uBAAuB,EAAE;EAC3B,CAAC;EACDC,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAMP,MAAM,GAAGtB,UAAU,CAAC8B,MAAM,CAAC;EAC/BP,OAAO,EAAE;IACP,GAAGvB,UAAU,CAAC+B,kBAAkB;IAChCC,eAAe,EAAE;EACnB,CAAC;EACDP,SAAS,EAAE;IACTQ,IAAI,EAAE,CAAC;IACPd,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,eAAed,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/leg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,CAIhB;IAEF,OAAO,CAAC,QAAQ,CAKd;IAEF,OAAO,CAAC,kBAAkB,CAQvB;IAEH,OAAO,CAAC,wBAAwB,CAM7B;IAEH,OAAO,CAAC,qBAAqB,CAC8B;IAE3D,OAAO,CAAC,kBAAkB,CAUxB;IAEF,OAAO,CAAC,YAAY,CAQlB;IAEF,OAAO,CAAC,eAAe,CAQrB;IAEF,MAAM;CAoKP"}
@@ -1,75 +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
- accessibilityLabel?: string | undefined;
73
- } & React.RefAttributes<Animated.View>>;
74
- export default Overlay;
75
- //# 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;AAqB/C,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cALD,aAAa,CAAC,MAAM,CAAC;aACtB,MAAM,IAAI;;uCA8CnB,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, overlayAccessibilityLabel, }: 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,EACtB,yBAAyB,GAC1B,EAAE,WAAW,eAmVb"}