react-native-drawer-layout 5.0.0-alpha.1 → 5.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/utils/getDrawerWidth.js +1 -1
- package/lib/module/utils/getDrawerWidth.js.map +1 -1
- package/lib/module/utils/useDrawerProgress.js +1 -1
- package/lib/module/utils/useDrawerProgress.js.map +1 -1
- package/lib/module/views/Drawer.native.js +67 -50
- package/lib/module/views/Drawer.native.js.map +1 -1
- package/lib/module/views/GestureHandler.js +4 -14
- package/lib/module/views/GestureHandler.js.map +1 -1
- package/lib/module/views/GestureHandlerNative.js +1 -1
- package/lib/module/views/GestureHandlerNative.js.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +23 -23
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/DrawerGestureContext.d.ts +2 -1
- package/lib/typescript/src/utils/DrawerGestureContext.d.ts.map +1 -1
- package/lib/typescript/src/utils/getDrawerWidth.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer.d.ts +3 -2
- package/lib/typescript/src/views/Drawer.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer.native.d.ts +3 -2
- package/lib/typescript/src/views/Drawer.native.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.android.d.ts +1 -1
- package/lib/typescript/src/views/GestureHandler.android.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.d.ts +5 -13
- package/lib/typescript/src/views/GestureHandler.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.ios.d.ts +1 -1
- package/lib/typescript/src/views/GestureHandler.ios.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandlerNative.d.ts +2 -2
- package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +1 -1
- package/lib/typescript/src/views/Overlay.d.ts +2 -2
- package/lib/typescript/src/views/Overlay.d.ts.map +1 -1
- package/lib/typescript/src/views/Overlay.native.d.ts +2 -2
- package/lib/typescript/src/views/Overlay.native.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/types.tsx +25 -23
- package/src/utils/getDrawerWidth.tsx +5 -3
- package/src/utils/useDrawerProgress.tsx +1 -1
- package/src/views/Drawer.native.tsx +63 -46
- package/src/views/GestureHandler.tsx +13 -15
- package/src/views/GestureHandlerNative.tsx +5 -3
|
@@ -15,7 +15,7 @@ export function getDrawerWidthNative({
|
|
|
15
15
|
}) {
|
|
16
16
|
'worklet';
|
|
17
17
|
|
|
18
|
-
const defaultWidth = containerWidth - APPROX_APP_BAR_HEIGHT <=
|
|
18
|
+
const defaultWidth = Math.max(containerWidth - APPROX_APP_BAR_HEIGHT <= DEFAULT_DRAWER_WIDTH ? containerWidth - APPROX_APP_BAR_HEIGHT : DEFAULT_DRAWER_WIDTH, 0);
|
|
19
19
|
const width = customWidth ?? defaultWidth;
|
|
20
20
|
if (typeof width === 'string' && width.endsWith('%')) {
|
|
21
21
|
// Try to calculate width if a percentage is given
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["APPROX_APP_BAR_HEIGHT","DEFAULT_DRAWER_WIDTH","DRAWER_DEFAULT_WIDTH_WEB","getDrawerWidthNative","containerWidth","customWidth","defaultWidth","width","endsWith","percentage","Number","replace","isFinite","getDrawerWidthWeb","drawerStyle"],"sourceRoot":"../../../src","sources":["utils/getDrawerWidth.tsx"],"mappings":";;AAEA,MAAMA,qBAAqB,GAAG,EAAE;AAChC,MAAMC,oBAAoB,GAAG,GAAG;;AAEhC;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,mBAAmBF,qBAAqB,QAAQC,oBAAoB,KAAK;AAE1G,OAAO,SAASE,oBAAoBA,CAAC;EACnCC,cAAc;EACdC;AAIF,CAAC,EAAE;EACD,SAAS;;EAET,MAAMC,YAAY,
|
|
1
|
+
{"version":3,"names":["APPROX_APP_BAR_HEIGHT","DEFAULT_DRAWER_WIDTH","DRAWER_DEFAULT_WIDTH_WEB","getDrawerWidthNative","containerWidth","customWidth","defaultWidth","Math","max","width","endsWith","percentage","Number","replace","isFinite","getDrawerWidthWeb","drawerStyle"],"sourceRoot":"../../../src","sources":["utils/getDrawerWidth.tsx"],"mappings":";;AAEA,MAAMA,qBAAqB,GAAG,EAAE;AAChC,MAAMC,oBAAoB,GAAG,GAAG;;AAEhC;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,mBAAmBF,qBAAqB,QAAQC,oBAAoB,KAAK;AAE1G,OAAO,SAASE,oBAAoBA,CAAC;EACnCC,cAAc;EACdC;AAIF,CAAC,EAAE;EACD,SAAS;;EAET,MAAMC,YAAY,GAAGC,IAAI,CAACC,GAAG,CAC3BJ,cAAc,GAAGJ,qBAAqB,IAAIC,oBAAoB,GAC1DG,cAAc,GAAGJ,qBAAqB,GACtCC,oBAAoB,EACxB,CACF,CAAC;EAED,MAAMQ,KAAK,GAAGJ,WAAW,IAAIC,YAAY;EAEzC,IAAI,OAAOG,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACC,QAAQ,CAAC,GAAG,CAAC,EAAE;IACpD;IACA,MAAMC,UAAU,GAAGC,MAAM,CAACH,KAAK,CAACI,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAElD,IAAID,MAAM,CAACE,QAAQ,CAACH,UAAU,CAAC,EAAE;MAC/B,OAAOP,cAAc,IAAIO,UAAU,GAAG,GAAG,CAAC;IAC5C;EACF;EAEA,OAAO,OAAOF,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGH,YAAY;AACzD;AAEA,OAAO,SAASS,iBAAiBA,CAAC;EAChCC;AAGF,CAAC,EAAU;EACT,MAAM;IAAEP;EAAM,CAAC,GAAGO,WAAW;EAE7B,IAAI,OAAOP,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAO,GAAGA,KAAK,IAAI;EACrB;EAEA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EAEA,OAAOP,wBAAwB;AACjC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { DrawerProgressContext } from "./DrawerProgressContext.js";
|
|
5
5
|
export function useDrawerProgress() {
|
|
6
|
-
const progress = React.
|
|
6
|
+
const progress = React.use(DrawerProgressContext);
|
|
7
7
|
if (progress === undefined) {
|
|
8
8
|
throw new Error("Couldn't find a drawer. Is your component inside a drawer?");
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","DrawerProgressContext","useDrawerProgress","progress","
|
|
1
|
+
{"version":3,"names":["React","DrawerProgressContext","useDrawerProgress","progress","use","undefined","Error"],"sourceRoot":"../../../src","sources":["utils/useDrawerProgress.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,qBAAqB,QAAQ,4BAAyB;AAE/D,OAAO,SAASC,iBAAiBA,CAAA,EAAkC;EACjE,MAAMC,QAAQ,GAAGH,KAAK,CAACI,GAAG,CAACH,qBAAqB,CAAC;EAEjD,IAAIE,QAAQ,KAAKE,SAAS,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,4DACF,CAAC;EACH;EAEA,OAAOH,QAAQ;AACjB","ignoreList":[]}
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Dimensions, I18nManager, Keyboard, Platform, StatusBar, StyleSheet, View } from 'react-native';
|
|
5
|
-
import Animated, { interpolate, ReduceMotion,
|
|
5
|
+
import Animated, { interpolate, ReduceMotion, useAnimatedStyle, useDerivedValue, useSharedValue, withSpring } from 'react-native-reanimated';
|
|
6
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
6
7
|
import useLatestCallback from 'use-latest-callback';
|
|
7
8
|
import { DrawerGestureContext } from "../utils/DrawerGestureContext.js";
|
|
8
9
|
import { DrawerProgressContext } from "../utils/DrawerProgressContext.js";
|
|
9
10
|
import { getDrawerWidthNative } from "../utils/getDrawerWidth.js";
|
|
10
|
-
import {
|
|
11
|
+
import { GestureDetector, GestureHandlerRootView, usePanGesture } from './GestureHandler';
|
|
11
12
|
import { Overlay } from './Overlay';
|
|
12
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
14
|
const SWIPE_EDGE_WIDTH = 32;
|
|
@@ -102,11 +103,14 @@ export function Drawer({
|
|
|
102
103
|
const layoutWidth = useSharedValue(initialWidth);
|
|
103
104
|
const translationX = useSharedValue(getDrawerTranslationX(open, initialWidth));
|
|
104
105
|
const contentRef = React.useRef(null);
|
|
106
|
+
const updateLayout = useLatestCallback(width => {
|
|
107
|
+
layoutWidth.set(width);
|
|
108
|
+
translationX.set(getDrawerTranslationX(open, width));
|
|
109
|
+
});
|
|
105
110
|
React.useLayoutEffect(() => {
|
|
106
111
|
const measureLayout = () => {
|
|
107
112
|
contentRef.current?.measure((_x, _y, width) => {
|
|
108
|
-
|
|
109
|
-
translationX.set(getDrawerTranslationX(open, width));
|
|
113
|
+
updateLayout(width);
|
|
110
114
|
});
|
|
111
115
|
};
|
|
112
116
|
measureLayout();
|
|
@@ -131,12 +135,12 @@ export function Drawer({
|
|
|
131
135
|
// subsequent updates will be handled by onLayout
|
|
132
136
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
133
137
|
}, []);
|
|
134
|
-
const onLayout = event => {
|
|
135
|
-
|
|
136
|
-
};
|
|
138
|
+
const onLayout = React.useCallback(event => {
|
|
139
|
+
updateLayout(event.nativeEvent.layout.width);
|
|
140
|
+
}, [updateLayout]);
|
|
137
141
|
const touchStartX = useSharedValue(0);
|
|
138
142
|
const touchX = useSharedValue(0);
|
|
139
|
-
const
|
|
143
|
+
const isGestureActive = useSharedValue(false);
|
|
140
144
|
const onAnimationStart = useLatestCallback(open => {
|
|
141
145
|
onTransitionStart?.(!open);
|
|
142
146
|
});
|
|
@@ -161,67 +165,80 @@ export function Drawer({
|
|
|
161
165
|
return;
|
|
162
166
|
}
|
|
163
167
|
if (velocity === undefined) {
|
|
164
|
-
|
|
168
|
+
scheduleOnRN(onAnimationStart, open);
|
|
165
169
|
}
|
|
170
|
+
|
|
171
|
+
// Ignore velocity that opposes the spring direction.
|
|
172
|
+
// Otherwise overshootClamping makes the spring snap instantly.
|
|
173
|
+
const isSameDirection = velocity !== undefined && (toValue > translationX.get() && velocity > 0 || toValue < translationX.get() && velocity < 0);
|
|
174
|
+
const effectiveVelocity = isSameDirection ? velocity : 0;
|
|
166
175
|
animatingTo.set(open ? 'open' : 'close');
|
|
167
176
|
translationX.set(withSpring(toValue, {
|
|
168
|
-
velocity,
|
|
169
|
-
stiffness:
|
|
170
|
-
damping:
|
|
171
|
-
mass:
|
|
177
|
+
velocity: effectiveVelocity,
|
|
178
|
+
stiffness: 500,
|
|
179
|
+
damping: 40,
|
|
180
|
+
mass: 1,
|
|
172
181
|
overshootClamping: true,
|
|
173
182
|
reduceMotion: ReduceMotion.Never
|
|
174
183
|
}, finished => {
|
|
175
184
|
animatingTo.set(null);
|
|
176
|
-
|
|
185
|
+
scheduleOnRN(onAnimationEnd, open, finished);
|
|
177
186
|
}));
|
|
178
187
|
if (open) {
|
|
179
|
-
|
|
188
|
+
scheduleOnRN(onOpen);
|
|
180
189
|
} else {
|
|
181
|
-
|
|
190
|
+
scheduleOnRN(onClose);
|
|
182
191
|
}
|
|
183
192
|
}, [touchStartX, touchX, layoutWidth, getDrawerTranslationX, translationX, animatingTo, onAnimationStart, onAnimationEnd, onOpen, onClose]);
|
|
184
193
|
React.useEffect(() => {
|
|
185
194
|
toggleDrawer(open);
|
|
186
195
|
}, [animatingTo, open, toggleDrawer]);
|
|
187
196
|
const startX = useSharedValue(0);
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
197
|
+
const panGestureConfig = React.useMemo(() => {
|
|
198
|
+
const config = {
|
|
199
|
+
onBegin: event => {
|
|
200
|
+
'worklet';
|
|
191
201
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
202
|
+
startX.set(translationX.get());
|
|
203
|
+
touchStartX.set(event.x);
|
|
204
|
+
},
|
|
205
|
+
onActivate: () => {
|
|
206
|
+
'worklet';
|
|
197
207
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
208
|
+
isGestureActive.set(true);
|
|
209
|
+
scheduleOnRN(onGestureBegin);
|
|
210
|
+
},
|
|
211
|
+
onUpdate: event => {
|
|
212
|
+
'worklet';
|
|
201
213
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
214
|
+
touchX.set(event.x);
|
|
215
|
+
translationX.set(startX.get() + event.translationX);
|
|
216
|
+
},
|
|
217
|
+
onDeactivate: event => {
|
|
218
|
+
'worklet';
|
|
207
219
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
isGestureActive.set(false);
|
|
221
|
+
if (event.canceled) {
|
|
222
|
+
toggleDrawer(open, event.velocityX);
|
|
223
|
+
scheduleOnRN(onGestureAbort);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
const nextOpen = Math.abs(event.translationX) > SWIPE_MIN_OFFSET && Math.abs(event.velocityX) > swipeMinVelocity || Math.abs(event.translationX) > swipeMinDistance ? drawerPosition === 'left' ?
|
|
227
|
+
// If swiped to right, open the drawer, otherwise close it
|
|
228
|
+
(event.velocityX === 0 ? event.translationX : event.velocityX) > 0 :
|
|
229
|
+
// If swiped to left, open the drawer, otherwise close it
|
|
230
|
+
(event.velocityX === 0 ? event.translationX : event.velocityX) < 0 : open;
|
|
231
|
+
toggleDrawer(nextOpen, event.velocityX);
|
|
232
|
+
scheduleOnRN(onGestureFinish);
|
|
233
|
+
},
|
|
234
|
+
activeOffsetX: [-SWIPE_MIN_OFFSET, SWIPE_MIN_OFFSET],
|
|
235
|
+
failOffsetY: [-SWIPE_MIN_OFFSET, SWIPE_MIN_OFFSET],
|
|
236
|
+
hitSlop,
|
|
237
|
+
enabled: drawerType !== 'permanent' && swipeEnabled
|
|
238
|
+
};
|
|
239
|
+
return configureGestureHandler?.(config) ?? config;
|
|
240
|
+
}, [configureGestureHandler, drawerPosition, drawerType, hitSlop, isGestureActive, onGestureBegin, onGestureAbort, onGestureFinish, open, startX, swipeEnabled, swipeMinDistance, swipeMinVelocity, toggleDrawer, touchStartX, touchX, translationX]);
|
|
241
|
+
const pan = usePanGesture(panGestureConfig);
|
|
225
242
|
const translateX = useDerivedValue(() => {
|
|
226
243
|
const drawerWidth = getDrawerWidthNative({
|
|
227
244
|
containerWidth: layoutWidth.get(),
|
|
@@ -253,7 +270,7 @@ export function Drawer({
|
|
|
253
270
|
// drawer be pulled back as soon as you start the pan.
|
|
254
271
|
//
|
|
255
272
|
// This is used only when drawerType is "front"
|
|
256
|
-
const touchDistance = drawerType === 'front' &&
|
|
273
|
+
const touchDistance = drawerType === 'front' && isGestureActive.get() ? minmax(drawerPosition === 'left' ? touchStartX.get() - drawerWidth : layoutWidth.get() - drawerWidth - touchStartX.get(), 0, layoutWidth.get()) : 0;
|
|
257
274
|
const translateX = drawerPosition === 'left' ? minmax(translationX.get() + touchDistance, -drawerWidth, 0) : minmax(translationX.get() - touchDistance, 0, drawerWidth);
|
|
258
275
|
return translateX;
|
|
259
276
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Dimensions","I18nManager","Keyboard","Platform","StatusBar","StyleSheet","View","Animated","interpolate","ReduceMotion","runOnJS","useAnimatedStyle","useDerivedValue","useSharedValue","withSpring","useLatestCallback","DrawerGestureContext","DrawerProgressContext","getDrawerWidthNative","Gesture","GestureDetector","GestureHandlerRootView","GestureState","Overlay","jsx","_jsx","jsxs","_jsxs","SWIPE_EDGE_WIDTH","SWIPE_MIN_OFFSET","SWIPE_MIN_DISTANCE","SWIPE_MIN_VELOCITY","minmax","value","start","end","Math","min","max","Drawer","direction","getConstants","isRTL","drawerPosition","drawerStyle","drawerType","configureGestureHandler","hideStatusBarOnOpen","keyboardDismissMode","onClose","onOpen","onGestureStart","onGestureCancel","onGestureEnd","onTransitionStart","onTransitionEnd","open","overlayStyle","overlayAccessibilityLabel","statusBarAnimation","swipeEnabled","OS","swipeEdgeWidth","swipeMinDistance","swipeMinVelocity","renderDrawerContent","children","style","width","customWidth","flatten","isOpen","isRight","getDrawerTranslationX","useCallback","containerWidth","drawerWidth","hideStatusBar","hide","setHidden","useEffect","hideKeyboard","dismiss","onGestureBegin","onGestureFinish","onGestureAbort","hitSlop","useMemo","right","undefined","left","initialWidth","useState","get","layoutWidth","translationX","contentRef","useRef","useLayoutEffect","measureLayout","current","measure","_x","_y","set","handle","subscription","addEventListener","requestAnimationFrame","cancelAnimationFrame","remove","onLayout","event","nativeEvent","layout","touchStartX","touchX","gestureState","UNDETERMINED","onAnimationStart","onAnimationEnd","finished","animatingTo","toggleDrawer","velocity","toValue","stiffness","damping","mass","overshootClamping","reduceMotion","Never","startX","pan","panGesture","Pan","onBegin","state","x","onStart","onChange","onEnd","success","nextOpen","abs","velocityX","activeOffsetX","failOffsetY","enabled","translateX","touchDistance","ACTIVE","drawerAnimatedStyle","distanceFromEdge","zIndex","transform","contentAnimatedStyle","progress","styles","container","Provider","gesture","main","flexDirection","ref","content","onPress","accessibilityLabel","removeClippedSubviews","drawer","position","create","flex","top","bottom","maxWidth","backgroundColor","select","web","default","overflow"],"sourceRoot":"../../../src","sources":["views/Drawer.native.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,UAAU,EACVC,WAAW,EACXC,QAAQ,E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AAC;AAE7B;AAEA,MAAM6F,MAAM,GAAGzJ,UAAU,CAACsK,MAAM,CAAC;EAC/BZ,SAAS,EAAE;IACTa,IAAI,EAAE;EACR,CAAC;EACDH,MAAM,EAAE;IACNI,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,MAAM;IAChBC,eAAe,EAAE;EACnB,CAAC;EACDX,OAAO,EAAE;IACPO,IAAI,EAAE;EACR,CAAC;EACDV,IAAI,EAAE;IACJU,IAAI,EAAE,CAAC;IACP,GAAGzK,QAAQ,CAAC8K,MAAM,CAAC;MACjB;MACA;MACAC,GAAG,EAAE,IAAI;MACTC,OAAO,EAAE;QAAEC,QAAQ,EAAE;MAAS;IAChC,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Dimensions","I18nManager","Keyboard","Platform","StatusBar","StyleSheet","View","Animated","interpolate","ReduceMotion","useAnimatedStyle","useDerivedValue","useSharedValue","withSpring","scheduleOnRN","useLatestCallback","DrawerGestureContext","DrawerProgressContext","getDrawerWidthNative","GestureDetector","GestureHandlerRootView","usePanGesture","Overlay","jsx","_jsx","jsxs","_jsxs","SWIPE_EDGE_WIDTH","SWIPE_MIN_OFFSET","SWIPE_MIN_DISTANCE","SWIPE_MIN_VELOCITY","minmax","value","start","end","Math","min","max","Drawer","direction","getConstants","isRTL","drawerPosition","drawerStyle","drawerType","configureGestureHandler","hideStatusBarOnOpen","keyboardDismissMode","onClose","onOpen","onGestureStart","onGestureCancel","onGestureEnd","onTransitionStart","onTransitionEnd","open","overlayStyle","overlayAccessibilityLabel","statusBarAnimation","swipeEnabled","OS","swipeEdgeWidth","swipeMinDistance","swipeMinVelocity","renderDrawerContent","children","style","width","customWidth","flatten","isOpen","isRight","getDrawerTranslationX","useCallback","containerWidth","drawerWidth","hideStatusBar","hide","setHidden","useEffect","hideKeyboard","dismiss","onGestureBegin","onGestureFinish","onGestureAbort","hitSlop","useMemo","right","undefined","left","initialWidth","useState","get","layoutWidth","translationX","contentRef","useRef","updateLayout","set","useLayoutEffect","measureLayout","current","measure","_x","_y","handle","subscription","addEventListener","requestAnimationFrame","cancelAnimationFrame","remove","onLayout","event","nativeEvent","layout","touchStartX","touchX","isGestureActive","onAnimationStart","onAnimationEnd","finished","animatingTo","toggleDrawer","velocity","toValue","isSameDirection","effectiveVelocity","stiffness","damping","mass","overshootClamping","reduceMotion","Never","startX","panGestureConfig","config","onBegin","x","onActivate","onUpdate","onDeactivate","canceled","velocityX","nextOpen","abs","activeOffsetX","failOffsetY","enabled","pan","translateX","touchDistance","drawerAnimatedStyle","distanceFromEdge","zIndex","transform","contentAnimatedStyle","progress","styles","container","Provider","gesture","main","flexDirection","ref","content","onPress","accessibilityLabel","removeClippedSubviews","drawer","position","create","flex","top","bottom","maxWidth","backgroundColor","select","web","default","overflow"],"sourceRoot":"../../../src","sources":["views/Drawer.native.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,UAAU,EACVC,WAAW,EACXC,QAAQ,EAERC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,IAAI,QACC,cAAc;AACrB,OAAOC,QAAQ,IACbC,WAAW,EACXC,YAAY,EACZC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,YAAY,QAAQ,uBAAuB;AACpD,OAAOC,iBAAiB,MAAM,qBAAqB;AAGnD,SAASC,oBAAoB,QAAQ,kCAA+B;AACpE,SAASC,qBAAqB,QAAQ,mCAAgC;AACtE,SAASC,oBAAoB,QAAQ,4BAAyB;AAC9D,SACEC,eAAe,EACfC,sBAAsB,EAEtBC,aAAa,QACR,kBAAkB;AACzB,SAASC,OAAO,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpC,MAAMC,gBAAgB,GAAG,EAAE;AAC3B,MAAMC,gBAAgB,GAAG,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AAI,EAAE,CAAC;IACP,GAAGxK,QAAQ,CAAC6K,MAAM,CAAC;MACjB;MACA;MACAC,GAAG,EAAE,IAAI;MACTC,OAAO,EAAE;QAAEC,QAAQ,EAAE;MAAS;IAChC,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
|
-
|
|
6
|
-
// FIXME: Inline this type instead of getting it from react-native-gesture-handler
|
|
7
|
-
// Otherwise, we get a type error:
|
|
8
|
-
// Exported variable 'GestureDetector' has or is using name 'GestureDetectorProps' from external module ".." but cannot be named.
|
|
9
5
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
10
6
|
export const GestureDetector = ({
|
|
11
7
|
gesture: _0,
|
|
@@ -17,14 +13,8 @@ export const GestureDetector = ({
|
|
|
17
13
|
});
|
|
18
14
|
};
|
|
19
15
|
export const GestureHandlerRootView = View;
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
GestureState[GestureState["BEGAN"] = 2] = "BEGAN";
|
|
25
|
-
GestureState[GestureState["CANCELLED"] = 3] = "CANCELLED";
|
|
26
|
-
GestureState[GestureState["ACTIVE"] = 4] = "ACTIVE";
|
|
27
|
-
GestureState[GestureState["END"] = 5] = "END";
|
|
28
|
-
return GestureState;
|
|
29
|
-
}({});
|
|
16
|
+
export function usePanGesture(config) {
|
|
17
|
+
React.useDebugValue(config);
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
30
20
|
//# sourceMappingURL=GestureHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Fragment","_Fragment","jsx","_jsx","GestureDetector","gesture","_0","userSelect","_1","children","GestureHandlerRootView","
|
|
1
|
+
{"version":3,"names":["React","View","Fragment","_Fragment","jsx","_jsx","GestureDetector","gesture","_0","userSelect","_1","children","GestureHandlerRootView","usePanGesture","config","useDebugValue","undefined"],"sourceRoot":"../../../src","sources":["views/GestureHandler.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,cAAc;AAAC,SAAAC,QAAA,IAAAC,SAAA,EAAAC,GAAA,IAAAC,IAAA;AAYpC,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,OAAO,EAAEC,EAAE;EACXC,UAAU,EAAEC,EAAE;EACdC;AACoB,CAAC,KAAK;EAC1B,oBAAON,IAAA,CAAAF,SAAA;IAAAQ,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB,CAAC;AAED,OAAO,MAAMC,sBAAsB,GAAGX,IAAI;AAE1C,OAAO,SAASY,aAAaA,CAACC,MAAwB,EAAE;EACtDd,KAAK,CAACe,aAAa,CAACD,MAAM,CAAC;EAE3B,OAAOE,SAAS;AAClB","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { GestureDetector, GestureHandlerRootView, usePanGesture } from 'react-native-gesture-handler';
|
|
4
4
|
//# sourceMappingURL=GestureHandlerNative.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["GestureDetector","GestureHandlerRootView","usePanGesture"],"sourceRoot":"../../../src","sources":["views/GestureHandlerNative.tsx"],"mappings":";;AAIA,SACEA,eAAe,EACfC,sBAAsB,EACtBC,aAAa,QACR,8BAA8B","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { DrawerGestureContext } from './utils/DrawerGestureContext';
|
|
2
|
-
export { DrawerProgressContext } from './utils/DrawerProgressContext';
|
|
3
|
-
export { useDrawerProgress } from './utils/useDrawerProgress';
|
|
1
|
+
export { DrawerGestureContext } from './utils/DrawerGestureContext.js';
|
|
2
|
+
export { DrawerProgressContext } from './utils/DrawerProgressContext.js';
|
|
3
|
+
export { useDrawerProgress } from './utils/useDrawerProgress.js';
|
|
4
4
|
export { Drawer } from './views/Drawer';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAA8B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAA+B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA2B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { StyleProp, View, ViewStyle } from 'react-native';
|
|
3
|
-
import type {
|
|
3
|
+
import type { PanGestureConfig } from 'react-native-gesture-handler';
|
|
4
4
|
import type { SharedValue } from 'react-native-reanimated';
|
|
5
5
|
export type DrawerProps = {
|
|
6
6
|
/**
|
|
@@ -18,23 +18,23 @@ export type DrawerProps = {
|
|
|
18
18
|
/**
|
|
19
19
|
* Callback which is called when a gesture starts.
|
|
20
20
|
*/
|
|
21
|
-
onGestureStart?: () => void;
|
|
21
|
+
onGestureStart?: (() => void) | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* Callback which is called when a gesture is cancelled.
|
|
24
24
|
*/
|
|
25
|
-
onGestureCancel?: () => void;
|
|
25
|
+
onGestureCancel?: (() => void) | undefined;
|
|
26
26
|
/**
|
|
27
27
|
* Callback which is called when a gesture ends.
|
|
28
28
|
*/
|
|
29
|
-
onGestureEnd?: () => void;
|
|
29
|
+
onGestureEnd?: (() => void) | undefined;
|
|
30
30
|
/**
|
|
31
31
|
* Callback which is called when the opening/closing transition starts.
|
|
32
32
|
*/
|
|
33
|
-
onTransitionStart?: (closing: boolean) => void;
|
|
33
|
+
onTransitionStart?: ((closing: boolean) => void) | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Callback which is called when the opening/closing transition ends.
|
|
36
36
|
*/
|
|
37
|
-
onTransitionEnd?: (closing: boolean) => void;
|
|
37
|
+
onTransitionEnd?: ((closing: boolean) => void) | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* Callback which returns a react element to render as the content of the drawer.
|
|
40
40
|
*/
|
|
@@ -43,12 +43,12 @@ export type DrawerProps = {
|
|
|
43
43
|
* Locale direction of the drawer.
|
|
44
44
|
* Defaults to `rtl` when `I18nManager.getConstants().isRTL` is `true` on Android & iOS, otherwise `ltr`.
|
|
45
45
|
*/
|
|
46
|
-
direction?: 'ltr' | 'rtl';
|
|
46
|
+
direction?: 'ltr' | 'rtl' | undefined;
|
|
47
47
|
/**
|
|
48
48
|
* Position of the drawer on the screen.
|
|
49
49
|
* Defaults to `right` in RTL mode, otherwise `left`.
|
|
50
50
|
*/
|
|
51
|
-
drawerPosition?: 'left' | 'right';
|
|
51
|
+
drawerPosition?: 'left' | 'right' | undefined;
|
|
52
52
|
/**
|
|
53
53
|
* Type of the drawer. It determines how the drawer looks and animates.
|
|
54
54
|
* - `front`: Traditional drawer which covers the screen with a overlay behind it.
|
|
@@ -58,67 +58,67 @@ export type DrawerProps = {
|
|
|
58
58
|
*
|
|
59
59
|
* Defaults to `slide` on iOS and `front` on other platforms.
|
|
60
60
|
*/
|
|
61
|
-
drawerType?: 'front' | 'back' | 'slide' | 'permanent';
|
|
61
|
+
drawerType?: 'front' | 'back' | 'slide' | 'permanent' | undefined;
|
|
62
62
|
/**
|
|
63
63
|
* Style object for the drawer component.
|
|
64
64
|
* You can pass a custom background color for drawer or a custom width here.
|
|
65
65
|
*/
|
|
66
|
-
drawerStyle?: StyleProp<ViewStyle
|
|
66
|
+
drawerStyle?: StyleProp<ViewStyle> | undefined;
|
|
67
67
|
/**
|
|
68
68
|
* Style object for the drawer overlay.
|
|
69
69
|
*/
|
|
70
|
-
overlayStyle?: StyleProp<ViewStyle
|
|
70
|
+
overlayStyle?: StyleProp<ViewStyle> | undefined;
|
|
71
71
|
/**
|
|
72
72
|
* Accessibility label for the overlay. This is read by the screen reader when the user taps the overlay.
|
|
73
73
|
* Defaults to "Close drawer".
|
|
74
74
|
*/
|
|
75
|
-
overlayAccessibilityLabel?: string;
|
|
75
|
+
overlayAccessibilityLabel?: string | undefined;
|
|
76
76
|
/**
|
|
77
77
|
* Whether the keyboard should be dismissed when the swipe gesture begins.
|
|
78
78
|
* Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.
|
|
79
79
|
*/
|
|
80
|
-
keyboardDismissMode?: 'none' | 'on-drag';
|
|
80
|
+
keyboardDismissMode?: 'none' | 'on-drag' | undefined;
|
|
81
81
|
/**
|
|
82
82
|
* Whether the statusbar should be hidden when the drawer is pulled or opens.
|
|
83
83
|
* Defaults to `false`.
|
|
84
84
|
*/
|
|
85
|
-
hideStatusBarOnOpen?: boolean;
|
|
85
|
+
hideStatusBarOnOpen?: boolean | undefined;
|
|
86
86
|
/**
|
|
87
87
|
* Animation of the statusbar when hiding it. Use in combination with `hideStatusBarOnOpen`.
|
|
88
88
|
*/
|
|
89
|
-
statusBarAnimation?: 'slide' | 'fade' | 'none';
|
|
89
|
+
statusBarAnimation?: 'slide' | 'fade' | 'none' | undefined;
|
|
90
90
|
/**
|
|
91
91
|
* Whether you can use swipe gestures to open or close the drawer.
|
|
92
92
|
* Defaults to `true`.
|
|
93
93
|
* This is not supported on Web.
|
|
94
94
|
*/
|
|
95
|
-
swipeEnabled?: boolean;
|
|
95
|
+
swipeEnabled?: boolean | undefined;
|
|
96
96
|
/**
|
|
97
97
|
* How far from the edge of the screen the swipe gesture should activate.
|
|
98
98
|
* Defaults to `32`.
|
|
99
99
|
* This is not supported on Web.
|
|
100
100
|
*/
|
|
101
|
-
swipeEdgeWidth?: number;
|
|
101
|
+
swipeEdgeWidth?: number | undefined;
|
|
102
102
|
/**
|
|
103
103
|
* Minimum swipe distance that should activate opening the drawer.
|
|
104
104
|
* Defaults to `60`.
|
|
105
105
|
* This is not supported on Web.
|
|
106
106
|
*/
|
|
107
|
-
swipeMinDistance?: number;
|
|
107
|
+
swipeMinDistance?: number | undefined;
|
|
108
108
|
/**
|
|
109
109
|
* Minimum swipe velocity that should activate opening the drawer.
|
|
110
110
|
* Defaults to `500`.
|
|
111
111
|
* This is not supported on Web.
|
|
112
112
|
*/
|
|
113
|
-
swipeMinVelocity?: number;
|
|
113
|
+
swipeMinVelocity?: number | undefined;
|
|
114
114
|
/**
|
|
115
|
-
* Function to modify the pan gesture
|
|
115
|
+
* Function to modify the pan gesture config.
|
|
116
116
|
*/
|
|
117
|
-
configureGestureHandler?: (gesture:
|
|
117
|
+
configureGestureHandler?: ((gesture: PanGestureConfig) => PanGestureConfig) | undefined;
|
|
118
118
|
/**
|
|
119
119
|
* Style object for the wrapper view.
|
|
120
120
|
*/
|
|
121
|
-
style?: StyleProp<ViewStyle
|
|
121
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
122
122
|
/**
|
|
123
123
|
* Content that the drawer should wrap.
|
|
124
124
|
*/
|
|
@@ -128,6 +128,6 @@ export type OverlayProps = React.ComponentProps<typeof View> & {
|
|
|
128
128
|
open: boolean;
|
|
129
129
|
progress: SharedValue<number>;
|
|
130
130
|
onPress: () => void;
|
|
131
|
-
accessibilityLabel?: string;
|
|
131
|
+
accessibilityLabel?: string | undefined;
|
|
132
132
|
};
|
|
133
133
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,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,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import type { PanGesture } from 'react-native-gesture-handler';
|
|
3
|
+
export declare const DrawerGestureContext: React.Context<PanGesture | undefined>;
|
|
3
4
|
//# sourceMappingURL=DrawerGestureContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerGestureContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/DrawerGestureContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DrawerGestureContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/DrawerGestureContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,eAAO,MAAM,oBAAoB,uCAEhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDrawerWidth.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDrawerWidth.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAYnE,wBAAgB,oBAAoB,CAAC,EACnC,cAAc,EACd,WAAW,GACZ,EAAE;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAAC;CAChD,
|
|
1
|
+
{"version":3,"file":"getDrawerWidth.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDrawerWidth.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAYnE,wBAAgB,oBAAoB,CAAC,EACnC,cAAc,EACd,WAAW,GACZ,EAAE;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAAC;CAChD,UAsBA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,GACZ,EAAE;IACD,WAAW,EAAE,SAAS,CAAC;CACxB,GAAG,MAAM,CAYT"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DrawerProps } from '../types.js';
|
|
3
|
+
export declare function Drawer({ direction, drawerPosition, drawerStyle, drawerType, onClose, onTransitionStart, onTransitionEnd, open, overlayStyle, overlayAccessibilityLabel, renderDrawerContent, children, style, }: DrawerProps): React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAU,CAAC;AAM5C,wBAAgB,MAAM,CAAC,EACrB,SAAiB,EACjB,cAAuD,EACvD,WAAW,EACX,UAAoB,EACpB,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,IAAI,EACJ,YAAY,EACZ,yBAAyB,EACzB,mBAAmB,EACnB,QAAQ,EACR,KAAK,GACN,EAAE,WAAW,qBA2Hb"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DrawerProps } from '../types.js';
|
|
3
|
+
export declare function Drawer({ direction, drawerPosition, drawerStyle, drawerType, configureGestureHandler, hideStatusBarOnOpen, keyboardDismissMode, onClose, onOpen, onGestureStart, onGestureCancel, onGestureEnd, onTransitionStart, onTransitionEnd, open, overlayStyle, overlayAccessibilityLabel, statusBarAnimation, swipeEnabled, swipeEdgeWidth, swipeMinDistance, swipeMinVelocity, renderDrawerContent, children, style, }: DrawerProps): React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=Drawer.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.native.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.native.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAU,CAAC;AAuB5C,wBAAgB,MAAM,CAAC,EACrB,SAA4D,EAC5D,cAAuD,EACvD,WAAW,EACX,UAAoB,EACpB,uBAAuB,EACvB,mBAA2B,EAC3B,mBAA+B,EAC/B,OAAO,EACP,MAAM,EACN,cAAc,EACd,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,IAAI,EACJ,YAAY,EACZ,yBAAyB,EACzB,kBAA4B,EAC5B,YAEyB,EACzB,cAAiC,EACjC,gBAAqC,EACrC,gBAAqC,EACrC,mBAAmB,EACnB,QAAQ,EACR,KAAK,GACN,EAAE,WAAW,qBAqfb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './GestureHandlerNative';
|
|
1
|
+
export * from './GestureHandlerNative.js';
|
|
2
2
|
//# sourceMappingURL=GestureHandler.android.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandler.android.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.android.tsx"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"GestureHandler.android.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.android.tsx"],"names":[],"mappings":"AAAA,cAAc,2BAAwB,CAAC"}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import type {
|
|
3
|
+
import type { PanGesture, PanGestureConfig } from 'react-native-gesture-handler';
|
|
4
4
|
type GestureDetectorProps = {
|
|
5
|
-
gesture:
|
|
5
|
+
gesture: PanGesture | undefined;
|
|
6
6
|
userSelect?: 'none' | 'auto' | 'text';
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export declare const GestureDetector: ({ gesture: _0, userSelect: _1, children, }: GestureDetectorProps) =>
|
|
9
|
+
export declare const GestureDetector: ({ gesture: _0, userSelect: _1, children, }: GestureDetectorProps) => React.JSX.Element;
|
|
10
10
|
export declare const GestureHandlerRootView: typeof View;
|
|
11
|
-
export declare
|
|
12
|
-
export
|
|
13
|
-
UNDETERMINED = 0,
|
|
14
|
-
FAILED = 1,
|
|
15
|
-
BEGAN = 2,
|
|
16
|
-
CANCELLED = 3,
|
|
17
|
-
ACTIVE = 4,
|
|
18
|
-
END = 5
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
11
|
+
export declare function usePanGesture(config: PanGestureConfig): undefined;
|
|
12
|
+
export type { PanGesture, PanGestureConfig, } from 'react-native-gesture-handler';
|
|
21
13
|
//# sourceMappingURL=GestureHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;AACpC,OAAO,KAAK,
|
|
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;AACpC,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,4CAI7B,oBAAoB,sBAEtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAO,CAAC;AAE3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,aAIrD;AAED,YAAY,EACV,UAAU,EACV,gBAAgB,GACjB,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './GestureHandlerNative';
|
|
1
|
+
export * from './GestureHandlerNative.js';
|
|
2
2
|
//# sourceMappingURL=GestureHandler.ios.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandler.ios.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.ios.tsx"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"GestureHandler.ios.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.ios.tsx"],"names":[],"mappings":"AAAA,cAAc,2BAAwB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { PanGesture, PanGestureConfig, } from 'react-native-gesture-handler';
|
|
2
|
+
export { GestureDetector, GestureHandlerRootView, usePanGesture, } from 'react-native-gesture-handler';
|
|
3
3
|
//# sourceMappingURL=GestureHandlerNative.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandlerNative.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandlerNative.tsx"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"GestureHandlerNative.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandlerNative.tsx"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,aAAa,GACd,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { OverlayProps } from '../types';
|
|
2
|
-
export declare function Overlay({ open, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react
|
|
1
|
+
import type { OverlayProps } from '../types.js';
|
|
2
|
+
export declare function Overlay({ open, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=Overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/views/Overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/views/Overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAU,CAAC;AAE7C,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,kBAAmC,EACnC,GAAG,IAAI,EACR,EAAE,YAAY,+BAoBd"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { OverlayProps } from '../types';
|
|
2
|
-
export declare function Overlay({ progress, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react
|
|
1
|
+
import type { OverlayProps } from '../types.js';
|
|
2
|
+
export declare function Overlay({ progress, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=Overlay.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.native.d.ts","sourceRoot":"","sources":["../../../../src/views/Overlay.native.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Overlay.native.d.ts","sourceRoot":"","sources":["../../../../src/views/Overlay.native.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAU,CAAC;AAI7C,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,OAAO,EACP,KAAK,EACL,kBAAmC,EACnC,GAAG,IAAI,EACR,EAAE,YAAY,+BAiCd"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-drawer-layout",
|
|
3
3
|
"description": "Drawer component for React Native",
|
|
4
|
-
"version": "5.0.0-alpha.
|
|
4
|
+
"version": "5.0.0-alpha.11",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -42,23 +42,23 @@
|
|
|
42
42
|
"clean": "del lib"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"
|
|
46
|
-
"use-latest-callback": "^0.3.2"
|
|
45
|
+
"use-latest-callback": "^0.3.4"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
|
-
"del-cli": "^
|
|
50
|
-
"react": "19.
|
|
51
|
-
"react-native": "0.
|
|
52
|
-
"react-native-builder-bob": "^0.
|
|
53
|
-
"react-native-reanimated": "4.1
|
|
54
|
-
"react-native-worklets": "0.
|
|
55
|
-
"typescript": "^
|
|
48
|
+
"del-cli": "^7.0.0",
|
|
49
|
+
"react": "19.2.0",
|
|
50
|
+
"react-native": "0.83.6",
|
|
51
|
+
"react-native-builder-bob": "^0.42.1",
|
|
52
|
+
"react-native-reanimated": "~4.2.1",
|
|
53
|
+
"react-native-worklets": "0.7.4",
|
|
54
|
+
"typescript": "^6.0.3"
|
|
56
55
|
},
|
|
57
56
|
"peerDependencies": {
|
|
58
|
-
"react": ">= 19.
|
|
57
|
+
"react": ">= 19.2.0",
|
|
59
58
|
"react-native": "*",
|
|
60
|
-
"react-native-gesture-handler": ">=
|
|
61
|
-
"react-native-reanimated": ">= 4.0.0"
|
|
59
|
+
"react-native-gesture-handler": ">= 3.0.0",
|
|
60
|
+
"react-native-reanimated": ">= 4.0.0",
|
|
61
|
+
"react-native-worklets": ">= 0.4.0"
|
|
62
62
|
},
|
|
63
63
|
"react-native-builder-bob": {
|
|
64
64
|
"source": "src",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
]
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "9c6b764c575fdf7e3c27df37f820899dda9d4259"
|
|
82
82
|
}
|
package/src/types.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { StyleProp, View, ViewStyle } from 'react-native';
|
|
3
|
-
import type {
|
|
3
|
+
import type { PanGestureConfig } from 'react-native-gesture-handler';
|
|
4
4
|
import type { SharedValue } from 'react-native-reanimated';
|
|
5
5
|
|
|
6
6
|
export type DrawerProps = {
|
|
@@ -22,27 +22,27 @@ export type DrawerProps = {
|
|
|
22
22
|
/**
|
|
23
23
|
* Callback which is called when a gesture starts.
|
|
24
24
|
*/
|
|
25
|
-
onGestureStart?: () => void;
|
|
25
|
+
onGestureStart?: (() => void) | undefined;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Callback which is called when a gesture is cancelled.
|
|
29
29
|
*/
|
|
30
|
-
onGestureCancel?: () => void;
|
|
30
|
+
onGestureCancel?: (() => void) | undefined;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Callback which is called when a gesture ends.
|
|
34
34
|
*/
|
|
35
|
-
onGestureEnd?: () => void;
|
|
35
|
+
onGestureEnd?: (() => void) | undefined;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Callback which is called when the opening/closing transition starts.
|
|
39
39
|
*/
|
|
40
|
-
onTransitionStart?: (closing: boolean) => void;
|
|
40
|
+
onTransitionStart?: ((closing: boolean) => void) | undefined;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Callback which is called when the opening/closing transition ends.
|
|
44
44
|
*/
|
|
45
|
-
onTransitionEnd?: (closing: boolean) => void;
|
|
45
|
+
onTransitionEnd?: ((closing: boolean) => void) | undefined;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Callback which returns a react element to render as the content of the drawer.
|
|
@@ -53,13 +53,13 @@ export type DrawerProps = {
|
|
|
53
53
|
* Locale direction of the drawer.
|
|
54
54
|
* Defaults to `rtl` when `I18nManager.getConstants().isRTL` is `true` on Android & iOS, otherwise `ltr`.
|
|
55
55
|
*/
|
|
56
|
-
direction?: 'ltr' | 'rtl';
|
|
56
|
+
direction?: 'ltr' | 'rtl' | undefined;
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Position of the drawer on the screen.
|
|
60
60
|
* Defaults to `right` in RTL mode, otherwise `left`.
|
|
61
61
|
*/
|
|
62
|
-
drawerPosition?: 'left' | 'right';
|
|
62
|
+
drawerPosition?: 'left' | 'right' | undefined;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Type of the drawer. It determines how the drawer looks and animates.
|
|
@@ -70,79 +70,81 @@ export type DrawerProps = {
|
|
|
70
70
|
*
|
|
71
71
|
* Defaults to `slide` on iOS and `front` on other platforms.
|
|
72
72
|
*/
|
|
73
|
-
drawerType?: 'front' | 'back' | 'slide' | 'permanent';
|
|
73
|
+
drawerType?: 'front' | 'back' | 'slide' | 'permanent' | undefined;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* Style object for the drawer component.
|
|
77
77
|
* You can pass a custom background color for drawer or a custom width here.
|
|
78
78
|
*/
|
|
79
|
-
drawerStyle?: StyleProp<ViewStyle
|
|
79
|
+
drawerStyle?: StyleProp<ViewStyle> | undefined;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Style object for the drawer overlay.
|
|
83
83
|
*/
|
|
84
|
-
overlayStyle?: StyleProp<ViewStyle
|
|
84
|
+
overlayStyle?: StyleProp<ViewStyle> | undefined;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* Accessibility label for the overlay. This is read by the screen reader when the user taps the overlay.
|
|
88
88
|
* Defaults to "Close drawer".
|
|
89
89
|
*/
|
|
90
|
-
overlayAccessibilityLabel?: string;
|
|
90
|
+
overlayAccessibilityLabel?: string | undefined;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Whether the keyboard should be dismissed when the swipe gesture begins.
|
|
94
94
|
* Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.
|
|
95
95
|
*/
|
|
96
|
-
keyboardDismissMode?: 'none' | 'on-drag';
|
|
96
|
+
keyboardDismissMode?: 'none' | 'on-drag' | undefined;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* Whether the statusbar should be hidden when the drawer is pulled or opens.
|
|
100
100
|
* Defaults to `false`.
|
|
101
101
|
*/
|
|
102
|
-
hideStatusBarOnOpen?: boolean;
|
|
102
|
+
hideStatusBarOnOpen?: boolean | undefined;
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* Animation of the statusbar when hiding it. Use in combination with `hideStatusBarOnOpen`.
|
|
106
106
|
*/
|
|
107
|
-
statusBarAnimation?: 'slide' | 'fade' | 'none';
|
|
107
|
+
statusBarAnimation?: 'slide' | 'fade' | 'none' | undefined;
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* Whether you can use swipe gestures to open or close the drawer.
|
|
111
111
|
* Defaults to `true`.
|
|
112
112
|
* This is not supported on Web.
|
|
113
113
|
*/
|
|
114
|
-
swipeEnabled?: boolean;
|
|
114
|
+
swipeEnabled?: boolean | undefined;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* How far from the edge of the screen the swipe gesture should activate.
|
|
118
118
|
* Defaults to `32`.
|
|
119
119
|
* This is not supported on Web.
|
|
120
120
|
*/
|
|
121
|
-
swipeEdgeWidth?: number;
|
|
121
|
+
swipeEdgeWidth?: number | undefined;
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* Minimum swipe distance that should activate opening the drawer.
|
|
125
125
|
* Defaults to `60`.
|
|
126
126
|
* This is not supported on Web.
|
|
127
127
|
*/
|
|
128
|
-
swipeMinDistance?: number;
|
|
128
|
+
swipeMinDistance?: number | undefined;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* Minimum swipe velocity that should activate opening the drawer.
|
|
132
132
|
* Defaults to `500`.
|
|
133
133
|
* This is not supported on Web.
|
|
134
134
|
*/
|
|
135
|
-
swipeMinVelocity?: number;
|
|
135
|
+
swipeMinVelocity?: number | undefined;
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
|
-
* Function to modify the pan gesture
|
|
138
|
+
* Function to modify the pan gesture config.
|
|
139
139
|
*/
|
|
140
|
-
configureGestureHandler?:
|
|
140
|
+
configureGestureHandler?:
|
|
141
|
+
| ((gesture: PanGestureConfig) => PanGestureConfig)
|
|
142
|
+
| undefined;
|
|
141
143
|
|
|
142
144
|
/**
|
|
143
145
|
* Style object for the wrapper view.
|
|
144
146
|
*/
|
|
145
|
-
style?: StyleProp<ViewStyle
|
|
147
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
146
148
|
|
|
147
149
|
/**
|
|
148
150
|
* Content that the drawer should wrap.
|
|
@@ -154,5 +156,5 @@ export type OverlayProps = React.ComponentProps<typeof View> & {
|
|
|
154
156
|
open: boolean;
|
|
155
157
|
progress: SharedValue<number>;
|
|
156
158
|
onPress: () => void;
|
|
157
|
-
accessibilityLabel?: string;
|
|
159
|
+
accessibilityLabel?: string | undefined;
|
|
158
160
|
};
|
|
@@ -19,10 +19,12 @@ export function getDrawerWidthNative({
|
|
|
19
19
|
}) {
|
|
20
20
|
'worklet';
|
|
21
21
|
|
|
22
|
-
const defaultWidth =
|
|
23
|
-
containerWidth - APPROX_APP_BAR_HEIGHT <=
|
|
22
|
+
const defaultWidth = Math.max(
|
|
23
|
+
containerWidth - APPROX_APP_BAR_HEIGHT <= DEFAULT_DRAWER_WIDTH
|
|
24
24
|
? containerWidth - APPROX_APP_BAR_HEIGHT
|
|
25
|
-
: DEFAULT_DRAWER_WIDTH
|
|
25
|
+
: DEFAULT_DRAWER_WIDTH,
|
|
26
|
+
0
|
|
27
|
+
);
|
|
26
28
|
|
|
27
29
|
const width = customWidth ?? defaultWidth;
|
|
28
30
|
|
|
@@ -4,7 +4,7 @@ import type { SharedValue } from 'react-native-reanimated';
|
|
|
4
4
|
import { DrawerProgressContext } from './DrawerProgressContext';
|
|
5
5
|
|
|
6
6
|
export function useDrawerProgress(): Readonly<SharedValue<number>> {
|
|
7
|
-
const progress = React.
|
|
7
|
+
const progress = React.use(DrawerProgressContext);
|
|
8
8
|
|
|
9
9
|
if (progress === undefined) {
|
|
10
10
|
throw new Error(
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
import Animated, {
|
|
13
13
|
interpolate,
|
|
14
14
|
ReduceMotion,
|
|
15
|
-
runOnJS,
|
|
16
15
|
useAnimatedStyle,
|
|
17
16
|
useDerivedValue,
|
|
18
17
|
useSharedValue,
|
|
19
18
|
withSpring,
|
|
20
19
|
} from 'react-native-reanimated';
|
|
20
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
21
21
|
import useLatestCallback from 'use-latest-callback';
|
|
22
22
|
|
|
23
23
|
import type { DrawerProps } from '../types';
|
|
@@ -25,10 +25,10 @@ import { DrawerGestureContext } from '../utils/DrawerGestureContext';
|
|
|
25
25
|
import { DrawerProgressContext } from '../utils/DrawerProgressContext';
|
|
26
26
|
import { getDrawerWidthNative } from '../utils/getDrawerWidth';
|
|
27
27
|
import {
|
|
28
|
-
Gesture,
|
|
29
28
|
GestureDetector,
|
|
30
29
|
GestureHandlerRootView,
|
|
31
|
-
|
|
30
|
+
type PanGestureConfig,
|
|
31
|
+
usePanGesture,
|
|
32
32
|
} from './GestureHandler';
|
|
33
33
|
import { Overlay } from './Overlay';
|
|
34
34
|
|
|
@@ -149,11 +149,15 @@ export function Drawer({
|
|
|
149
149
|
|
|
150
150
|
const contentRef = React.useRef<View>(null);
|
|
151
151
|
|
|
152
|
+
const updateLayout = useLatestCallback((width: number) => {
|
|
153
|
+
layoutWidth.set(width);
|
|
154
|
+
translationX.set(getDrawerTranslationX(open, width));
|
|
155
|
+
});
|
|
156
|
+
|
|
152
157
|
React.useLayoutEffect(() => {
|
|
153
158
|
const measureLayout = () => {
|
|
154
159
|
contentRef.current?.measure((_x, _y, width) => {
|
|
155
|
-
|
|
156
|
-
translationX.set(getDrawerTranslationX(open, width));
|
|
160
|
+
updateLayout(width);
|
|
157
161
|
});
|
|
158
162
|
};
|
|
159
163
|
|
|
@@ -183,13 +187,16 @@ export function Drawer({
|
|
|
183
187
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
184
188
|
}, []);
|
|
185
189
|
|
|
186
|
-
const onLayout = (
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
const onLayout = React.useCallback(
|
|
191
|
+
(event: LayoutChangeEvent) => {
|
|
192
|
+
updateLayout(event.nativeEvent.layout.width);
|
|
193
|
+
},
|
|
194
|
+
[updateLayout]
|
|
195
|
+
);
|
|
189
196
|
|
|
190
197
|
const touchStartX = useSharedValue(0);
|
|
191
198
|
const touchX = useSharedValue(0);
|
|
192
|
-
const
|
|
199
|
+
const isGestureActive = useSharedValue(false);
|
|
193
200
|
|
|
194
201
|
const onAnimationStart = useLatestCallback((open: boolean) => {
|
|
195
202
|
onTransitionStart?.(!open);
|
|
@@ -226,32 +233,41 @@ export function Drawer({
|
|
|
226
233
|
}
|
|
227
234
|
|
|
228
235
|
if (velocity === undefined) {
|
|
229
|
-
|
|
236
|
+
scheduleOnRN(onAnimationStart, open);
|
|
230
237
|
}
|
|
231
238
|
|
|
239
|
+
// Ignore velocity that opposes the spring direction.
|
|
240
|
+
// Otherwise overshootClamping makes the spring snap instantly.
|
|
241
|
+
const isSameDirection =
|
|
242
|
+
velocity !== undefined &&
|
|
243
|
+
((toValue > translationX.get() && velocity > 0) ||
|
|
244
|
+
(toValue < translationX.get() && velocity < 0));
|
|
245
|
+
|
|
246
|
+
const effectiveVelocity = isSameDirection ? velocity : 0;
|
|
247
|
+
|
|
232
248
|
animatingTo.set(open ? 'open' : 'close');
|
|
233
249
|
translationX.set(
|
|
234
250
|
withSpring(
|
|
235
251
|
toValue,
|
|
236
252
|
{
|
|
237
|
-
velocity,
|
|
238
|
-
stiffness:
|
|
239
|
-
damping:
|
|
240
|
-
mass:
|
|
253
|
+
velocity: effectiveVelocity,
|
|
254
|
+
stiffness: 500,
|
|
255
|
+
damping: 40,
|
|
256
|
+
mass: 1,
|
|
241
257
|
overshootClamping: true,
|
|
242
258
|
reduceMotion: ReduceMotion.Never,
|
|
243
259
|
},
|
|
244
260
|
(finished) => {
|
|
245
261
|
animatingTo.set(null);
|
|
246
|
-
|
|
262
|
+
scheduleOnRN(onAnimationEnd, open, finished);
|
|
247
263
|
}
|
|
248
264
|
)
|
|
249
265
|
);
|
|
250
266
|
|
|
251
267
|
if (open) {
|
|
252
|
-
|
|
268
|
+
scheduleOnRN(onOpen);
|
|
253
269
|
} else {
|
|
254
|
-
|
|
270
|
+
scheduleOnRN(onClose);
|
|
255
271
|
}
|
|
256
272
|
},
|
|
257
273
|
[
|
|
@@ -274,39 +290,41 @@ export function Drawer({
|
|
|
274
290
|
|
|
275
291
|
const startX = useSharedValue(0);
|
|
276
292
|
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
|
|
293
|
+
const panGestureConfig = React.useMemo(() => {
|
|
294
|
+
const config: PanGestureConfig = {
|
|
295
|
+
onBegin: (event) => {
|
|
280
296
|
'worklet';
|
|
281
297
|
|
|
282
298
|
startX.set(translationX.get());
|
|
283
|
-
gestureState.set(event.state);
|
|
284
299
|
touchStartX.set(event.x);
|
|
285
|
-
}
|
|
286
|
-
|
|
300
|
+
},
|
|
301
|
+
onActivate: () => {
|
|
287
302
|
'worklet';
|
|
288
303
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
304
|
+
isGestureActive.set(true);
|
|
305
|
+
scheduleOnRN(onGestureBegin);
|
|
306
|
+
},
|
|
307
|
+
onUpdate: (event) => {
|
|
292
308
|
'worklet';
|
|
293
309
|
|
|
294
310
|
touchX.set(event.x);
|
|
295
311
|
translationX.set(startX.get() + event.translationX);
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
.onEnd((event, success) => {
|
|
312
|
+
},
|
|
313
|
+
onDeactivate: (event) => {
|
|
299
314
|
'worklet';
|
|
300
315
|
|
|
301
|
-
|
|
316
|
+
isGestureActive.set(false);
|
|
317
|
+
|
|
318
|
+
if (event.canceled) {
|
|
319
|
+
toggleDrawer(open, event.velocityX);
|
|
320
|
+
scheduleOnRN(onGestureAbort);
|
|
302
321
|
|
|
303
|
-
|
|
304
|
-
runOnJS(onGestureAbort)();
|
|
322
|
+
return;
|
|
305
323
|
}
|
|
306
324
|
|
|
307
325
|
const nextOpen =
|
|
308
326
|
(Math.abs(event.translationX) > SWIPE_MIN_OFFSET &&
|
|
309
|
-
Math.abs(event.
|
|
327
|
+
Math.abs(event.velocityX) > swipeMinVelocity) ||
|
|
310
328
|
Math.abs(event.translationX) > swipeMinDistance
|
|
311
329
|
? drawerPosition === 'left'
|
|
312
330
|
? // If swiped to right, open the drawer, otherwise close it
|
|
@@ -318,24 +336,21 @@ export function Drawer({
|
|
|
318
336
|
: open;
|
|
319
337
|
|
|
320
338
|
toggleDrawer(nextOpen, event.velocityX);
|
|
321
|
-
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
if (panGesture && configureGestureHandler) {
|
|
329
|
-
panGesture = configureGestureHandler(panGesture);
|
|
330
|
-
}
|
|
339
|
+
scheduleOnRN(onGestureFinish);
|
|
340
|
+
},
|
|
341
|
+
activeOffsetX: [-SWIPE_MIN_OFFSET, SWIPE_MIN_OFFSET],
|
|
342
|
+
failOffsetY: [-SWIPE_MIN_OFFSET, SWIPE_MIN_OFFSET],
|
|
343
|
+
hitSlop,
|
|
344
|
+
enabled: drawerType !== 'permanent' && swipeEnabled,
|
|
345
|
+
};
|
|
331
346
|
|
|
332
|
-
return
|
|
347
|
+
return configureGestureHandler?.(config) ?? config;
|
|
333
348
|
}, [
|
|
334
349
|
configureGestureHandler,
|
|
335
350
|
drawerPosition,
|
|
336
351
|
drawerType,
|
|
337
|
-
gestureState,
|
|
338
352
|
hitSlop,
|
|
353
|
+
isGestureActive,
|
|
339
354
|
onGestureBegin,
|
|
340
355
|
onGestureAbort,
|
|
341
356
|
onGestureFinish,
|
|
@@ -350,6 +365,8 @@ export function Drawer({
|
|
|
350
365
|
translationX,
|
|
351
366
|
]);
|
|
352
367
|
|
|
368
|
+
const pan = usePanGesture(panGestureConfig);
|
|
369
|
+
|
|
353
370
|
const translateX = useDerivedValue(() => {
|
|
354
371
|
const drawerWidth = getDrawerWidthNative({
|
|
355
372
|
containerWidth: layoutWidth.get(),
|
|
@@ -382,7 +399,7 @@ export function Drawer({
|
|
|
382
399
|
//
|
|
383
400
|
// This is used only when drawerType is "front"
|
|
384
401
|
const touchDistance =
|
|
385
|
-
drawerType === 'front' &&
|
|
402
|
+
drawerType === 'front' && isGestureActive.get()
|
|
386
403
|
? minmax(
|
|
387
404
|
drawerPosition === 'left'
|
|
388
405
|
? touchStartX.get() - drawerWidth
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
PanGesture,
|
|
5
|
+
PanGestureConfig,
|
|
6
|
+
} from 'react-native-gesture-handler';
|
|
4
7
|
|
|
5
|
-
// FIXME: Inline this type instead of getting it from react-native-gesture-handler
|
|
6
|
-
// Otherwise, we get a type error:
|
|
7
|
-
// Exported variable 'GestureDetector' has or is using name 'GestureDetectorProps' from external module ".." but cannot be named.
|
|
8
8
|
type GestureDetectorProps = {
|
|
9
|
-
gesture:
|
|
9
|
+
gesture: PanGesture | undefined;
|
|
10
10
|
userSelect?: 'none' | 'auto' | 'text';
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
};
|
|
@@ -21,15 +21,13 @@ export const GestureDetector = ({
|
|
|
21
21
|
|
|
22
22
|
export const GestureHandlerRootView = View;
|
|
23
23
|
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
| undefined = undefined;
|
|
24
|
+
export function usePanGesture(config: PanGestureConfig) {
|
|
25
|
+
React.useDebugValue(config);
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
UNDETERMINED = 0,
|
|
30
|
-
FAILED = 1,
|
|
31
|
-
BEGAN = 2,
|
|
32
|
-
CANCELLED = 3,
|
|
33
|
-
ACTIVE = 4,
|
|
34
|
-
END = 5,
|
|
27
|
+
return undefined;
|
|
35
28
|
}
|
|
29
|
+
|
|
30
|
+
export type {
|
|
31
|
+
PanGesture,
|
|
32
|
+
PanGestureConfig,
|
|
33
|
+
} from 'react-native-gesture-handler';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type {
|
|
2
|
+
PanGesture,
|
|
3
|
+
PanGestureConfig,
|
|
4
|
+
} from 'react-native-gesture-handler';
|
|
2
5
|
export {
|
|
3
|
-
Gesture,
|
|
4
6
|
GestureDetector,
|
|
5
7
|
GestureHandlerRootView,
|
|
6
|
-
|
|
8
|
+
usePanGesture,
|
|
7
9
|
} from 'react-native-gesture-handler';
|