@rific/drawer 0.1.1 → 0.2.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.
- package/README.md +60 -4
- package/dist/index.d.mts +42 -10
- package/dist/index.d.ts +42 -10
- package/dist/index.js +198 -43
- package/dist/index.mjs +213 -51
- package/package.json +8 -1
- package/src/Drawer.tsx +242 -24
- package/src/DrawerEdgeSwipe.tsx +45 -18
- package/src/createDrawer.tsx +89 -11
- package/src/geometry.ts +16 -0
- package/src/index.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -1,37 +1,147 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
1
8
|
// src/createDrawer.tsx
|
|
2
|
-
import { createContext, useContext, useMemo, useState } from "react";
|
|
9
|
+
import { createContext, useContext, useEffect as useEffect2, useMemo, useState as useState2 } from "react";
|
|
10
|
+
import { BackHandler } from "react-native";
|
|
3
11
|
import { useSharedValue as useSharedValue2 } from "react-native-reanimated";
|
|
4
12
|
|
|
5
13
|
// src/Drawer.tsx
|
|
6
14
|
import { Pressable } from "@rific/haptic-press";
|
|
7
|
-
import { useEffect } from "react";
|
|
8
|
-
import { StyleSheet } from "react-native";
|
|
15
|
+
import { useEffect, useState } from "react";
|
|
16
|
+
import { Platform, StyleSheet, View } from "react-native";
|
|
17
|
+
import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
|
9
18
|
import { useTheme } from "react-native-paper";
|
|
10
|
-
import Animated, { useAnimatedStyle, useSharedValue, withSpring } from "react-native-reanimated";
|
|
19
|
+
import Animated, { runOnJS, useAnimatedStyle, useSharedValue, withSpring, withTiming } from "react-native-reanimated";
|
|
20
|
+
|
|
21
|
+
// src/geometry.ts
|
|
22
|
+
function isVerticalSide(side) {
|
|
23
|
+
return side === "top" || side === "bottom";
|
|
24
|
+
}
|
|
25
|
+
function getClosedOffset(side, size) {
|
|
26
|
+
return side === "left" || side === "top" ? -size : size;
|
|
27
|
+
}
|
|
28
|
+
function getOpenDirection(side) {
|
|
29
|
+
return side === "left" || side === "top" ? 1 : -1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/Drawer.tsx
|
|
11
33
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
34
|
var SPRING = { damping: 40, stiffness: 300, overshootClamping: true };
|
|
13
|
-
var
|
|
35
|
+
var VELOCITY_THRESHOLD = 500;
|
|
36
|
+
var AutoPaper = (() => {
|
|
37
|
+
try {
|
|
38
|
+
return __require("@rific/auto-paper");
|
|
39
|
+
} catch {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
})();
|
|
43
|
+
var useBlurFallback = (override) => override ?? false;
|
|
44
|
+
var useBlurHook = AutoPaper?.useBlur ?? useBlurFallback;
|
|
45
|
+
var Drawer = ({ backdropOpacity = 0.45, blockingBackdrop = true, blur, children, contentSize = false, dismissible = true, height = 300, onClose, onClosed, onMeasure, onOpened, open, side = "left", showHandle = true, translateOffset: externalTranslateOffset, width = 300, zIndex = 50 }) => {
|
|
14
46
|
const { colors } = useTheme();
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
47
|
+
const vertical = isVerticalSide(side);
|
|
48
|
+
const size = vertical ? height : width;
|
|
49
|
+
const openDirection = getOpenDirection(side);
|
|
50
|
+
const closeDirection = -openDirection;
|
|
51
|
+
const [measuredSize, setMeasuredSize] = useState(null);
|
|
52
|
+
const effectiveSize = contentSize ? measuredSize ?? size : size;
|
|
53
|
+
const closedOffset = getClosedOffset(side, effectiveSize);
|
|
54
|
+
const internalTranslateOffset = useSharedValue(closedOffset);
|
|
55
|
+
const translateOffset = externalTranslateOffset ?? internalTranslateOffset;
|
|
56
|
+
const resolvedBlur = useBlurHook(blur);
|
|
57
|
+
const animatedSize = useSharedValue(effectiveSize);
|
|
18
58
|
useEffect(() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
59
|
+
if (open) {
|
|
60
|
+
translateOffset.value = withSpring(0, SPRING, (finished) => {
|
|
61
|
+
if (finished && onOpened) runOnJS(onOpened)();
|
|
62
|
+
});
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
translateOffset.value = withSpring(closedOffset, SPRING, (finished) => {
|
|
66
|
+
if (finished && onClosed) runOnJS(onClosed)();
|
|
67
|
+
});
|
|
68
|
+
}, [open, closedOffset, translateOffset]);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (contentSize) {
|
|
71
|
+
animatedSize.value = withTiming(effectiveSize);
|
|
72
|
+
}
|
|
73
|
+
}, [contentSize, effectiveSize, animatedSize]);
|
|
74
|
+
const drawerStyle = useAnimatedStyle(() => ({ transform: [vertical ? { translateY: translateOffset.value } : { translateX: translateOffset.value }] }));
|
|
75
|
+
const backdropStyle = useAnimatedStyle(() => ({ opacity: (1 - Math.abs(translateOffset.value) / effectiveSize) * backdropOpacity }));
|
|
76
|
+
const animatedSizeStyle = useAnimatedStyle(() => vertical ? { height: animatedSize.value } : { width: animatedSize.value });
|
|
77
|
+
const positionStyle = side === "left" ? styles.anchorLeft : side === "right" ? styles.anchorRight : side === "top" ? styles.anchorTop : styles.anchorBottom;
|
|
78
|
+
const sizeStyle = vertical ? { height } : { width };
|
|
79
|
+
const handleLayout = (event) => {
|
|
80
|
+
const measured = vertical ? event.nativeEvent.layout.height : event.nativeEvent.layout.width;
|
|
81
|
+
setMeasuredSize(measured);
|
|
82
|
+
onMeasure?.(measured);
|
|
83
|
+
};
|
|
84
|
+
const fillStyle = StyleSheet.absoluteFill;
|
|
85
|
+
const fill = resolvedBlur && AutoPaper?.BlurView ? contentSize ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
86
|
+
/* @__PURE__ */ jsx(AutoPaper.BlurView, { style: fillStyle }),
|
|
87
|
+
/* @__PURE__ */ jsx(View, { onLayout: handleLayout, children })
|
|
88
|
+
] }) : /* @__PURE__ */ jsx(AutoPaper.BlurView, { style: fillStyle, children }) : contentSize ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
89
|
+
/* @__PURE__ */ jsx(View, { style: [fillStyle, { backgroundColor: colors.surface }] }),
|
|
90
|
+
/* @__PURE__ */ jsx(View, { onLayout: handleLayout, children })
|
|
91
|
+
] }) : /* @__PURE__ */ jsx(View, { style: [fillStyle, { backgroundColor: colors.surface }], children });
|
|
92
|
+
const drawerOuterStyle = contentSize ? [styles.drawer, positionStyle, styles.clip, { flexDirection: vertical ? "column" : "row" }, drawerStyle, animatedSizeStyle, { zIndex: zIndex + 1 }] : [styles.drawer, positionStyle, sizeStyle, drawerStyle, { zIndex: zIndex + 1 }];
|
|
93
|
+
const clampMin = Math.min(0, closedOffset);
|
|
94
|
+
const clampMax = Math.max(0, closedOffset);
|
|
95
|
+
const handleAxisGesture = vertical ? Gesture.Pan().activeOffsetY(closeDirection * 10).failOffsetX([-15, 15]) : Gesture.Pan().activeOffsetX(closeDirection * 10).failOffsetY([-15, 15]);
|
|
96
|
+
const handleGesture = handleAxisGesture.enabled(open).onUpdate((event) => {
|
|
97
|
+
"worklet";
|
|
98
|
+
const translation = vertical ? event.translationY : event.translationX;
|
|
99
|
+
translateOffset.value = Math.min(clampMax, Math.max(clampMin, translation));
|
|
100
|
+
}).onEnd((event) => {
|
|
101
|
+
"worklet";
|
|
102
|
+
const translation = vertical ? event.translationY : event.translationX;
|
|
103
|
+
const velocity = vertical ? event.velocityY : event.velocityX;
|
|
104
|
+
const commit = translation * closeDirection > effectiveSize / 3 || velocity * closeDirection > VELOCITY_THRESHOLD;
|
|
105
|
+
if (commit) {
|
|
106
|
+
translateOffset.value = withSpring(closedOffset, SPRING);
|
|
107
|
+
runOnJS(onClose)();
|
|
108
|
+
} else {
|
|
109
|
+
translateOffset.value = withSpring(0, SPRING);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const HANDLE_STRIP_THICKNESS = 28;
|
|
113
|
+
const handleStripSizeStyle = vertical ? { height: HANDLE_STRIP_THICKNESS, left: 0, right: 0 } : { bottom: 0, top: 0, width: HANDLE_STRIP_THICKNESS };
|
|
114
|
+
const handleStripEdgeStyle = side === "bottom" ? { top: 0 } : side === "top" ? { bottom: 0 } : side === "left" ? { right: 0 } : { left: 0 };
|
|
115
|
+
const handlePillStyle = vertical ? { height: 6, width: 64 } : { height: 64, width: 6 };
|
|
116
|
+
const webCursorStyle = { cursor: Platform.OS === "web" ? "pointer" : void 0 };
|
|
24
117
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25
|
-
/* @__PURE__ */ jsx(Animated.View, { style: [styles.backdrop, backdropStyle], pointerEvents: open ? "auto" : "none", children: /* @__PURE__ */ jsx(Pressable, { style: StyleSheet.absoluteFill, onPress: onClose }) }),
|
|
26
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [styles.backdrop, { zIndex }, backdropStyle], pointerEvents: open && blockingBackdrop ? "auto" : "none", children: /* @__PURE__ */ jsx(Pressable, { style: StyleSheet.absoluteFill, onPress: onClose }) }),
|
|
119
|
+
/* @__PURE__ */ jsxs(Animated.View, { style: drawerOuterStyle, children: [
|
|
120
|
+
fill,
|
|
121
|
+
dismissible && /* @__PURE__ */ jsx(GestureDetector, { gesture: handleGesture, children: /* @__PURE__ */ jsx(View, { style: [styles.handleStrip, handleStripSizeStyle, handleStripEdgeStyle, webCursorStyle, { zIndex: zIndex + 2 }], children: showHandle && /* @__PURE__ */ jsx(View, { style: [styles.handlePill, handlePillStyle, { backgroundColor: colors.onSurfaceVariant }] }) }) })
|
|
122
|
+
] })
|
|
27
123
|
] });
|
|
28
124
|
};
|
|
29
125
|
var styles = StyleSheet.create({
|
|
126
|
+
anchorBottom: {
|
|
127
|
+
bottom: 0,
|
|
128
|
+
left: 0,
|
|
129
|
+
right: 0
|
|
130
|
+
},
|
|
30
131
|
anchorLeft: {
|
|
31
|
-
|
|
132
|
+
bottom: 0,
|
|
133
|
+
left: 0,
|
|
134
|
+
top: 0
|
|
32
135
|
},
|
|
33
136
|
anchorRight: {
|
|
34
|
-
|
|
137
|
+
bottom: 0,
|
|
138
|
+
right: 0,
|
|
139
|
+
top: 0
|
|
140
|
+
},
|
|
141
|
+
anchorTop: {
|
|
142
|
+
left: 0,
|
|
143
|
+
right: 0,
|
|
144
|
+
top: 0
|
|
35
145
|
},
|
|
36
146
|
backdrop: {
|
|
37
147
|
backgroundColor: "#000",
|
|
@@ -39,45 +149,70 @@ var styles = StyleSheet.create({
|
|
|
39
149
|
left: 0,
|
|
40
150
|
position: "absolute",
|
|
41
151
|
right: 0,
|
|
42
|
-
top: 0
|
|
43
|
-
|
|
152
|
+
top: 0
|
|
153
|
+
},
|
|
154
|
+
clip: {
|
|
155
|
+
overflow: "hidden"
|
|
44
156
|
},
|
|
45
157
|
drawer: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
158
|
+
position: "absolute"
|
|
159
|
+
},
|
|
160
|
+
handlePill: {
|
|
161
|
+
borderRadius: 3,
|
|
162
|
+
opacity: 0.5
|
|
163
|
+
},
|
|
164
|
+
handleStrip: {
|
|
165
|
+
alignItems: "center",
|
|
166
|
+
justifyContent: "center",
|
|
167
|
+
position: "absolute"
|
|
50
168
|
}
|
|
51
169
|
});
|
|
52
170
|
|
|
53
171
|
// src/DrawerEdgeSwipe.tsx
|
|
54
|
-
import { StyleSheet as StyleSheet2, View } from "react-native";
|
|
55
|
-
import { Gesture, GestureDetector } from "react-native-gesture-handler";
|
|
56
|
-
import { runOnJS, withSpring as withSpring2 } from "react-native-reanimated";
|
|
172
|
+
import { StyleSheet as StyleSheet2, View as View2 } from "react-native";
|
|
173
|
+
import { Gesture as Gesture2, GestureDetector as GestureDetector2 } from "react-native-gesture-handler";
|
|
174
|
+
import { runOnJS as runOnJS2, withSpring as withSpring2 } from "react-native-reanimated";
|
|
57
175
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
58
176
|
var EDGE_WIDTH = 24;
|
|
59
177
|
var SPRING2 = { damping: 40, overshootClamping: true, stiffness: 300 };
|
|
60
|
-
var
|
|
61
|
-
var DrawerEdgeSwipe = ({ enabled = true, onOpen, side = "left",
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
|
|
178
|
+
var VELOCITY_THRESHOLD2 = 500;
|
|
179
|
+
var DrawerEdgeSwipe = ({ enabled = true, height = 300, onOpen, side = "left", translateOffset, width = 300 }) => {
|
|
180
|
+
const vertical = isVerticalSide(side);
|
|
181
|
+
const size = vertical ? height : width;
|
|
182
|
+
const closedOffset = getClosedOffset(side, size);
|
|
183
|
+
const openDirection = getOpenDirection(side);
|
|
184
|
+
const clampMin = Math.min(0, closedOffset);
|
|
185
|
+
const clampMax = Math.max(0, closedOffset);
|
|
186
|
+
const axisGesture = vertical ? Gesture2.Pan().activeOffsetY(side === "top" ? 10 : -10).failOffsetX([-15, 15]) : Gesture2.Pan().activeOffsetX(side === "left" ? 10 : -10).failOffsetY([-15, 15]);
|
|
187
|
+
const gesture = axisGesture.enabled(enabled).onUpdate((event) => {
|
|
188
|
+
"worklet";
|
|
189
|
+
const translation = vertical ? event.translationY : event.translationX;
|
|
190
|
+
translateOffset.value = Math.min(clampMax, Math.max(clampMin, closedOffset + translation));
|
|
68
191
|
}).onEnd((event) => {
|
|
69
|
-
|
|
192
|
+
"worklet";
|
|
193
|
+
const translation = vertical ? event.translationY : event.translationX;
|
|
194
|
+
const velocity = vertical ? event.velocityY : event.velocityX;
|
|
195
|
+
const commit = translation * openDirection > size / 3 || velocity * openDirection > VELOCITY_THRESHOLD2;
|
|
70
196
|
if (commit) {
|
|
71
|
-
|
|
72
|
-
|
|
197
|
+
translateOffset.value = withSpring2(0, SPRING2);
|
|
198
|
+
runOnJS2(onOpen)();
|
|
73
199
|
} else {
|
|
74
|
-
|
|
200
|
+
translateOffset.value = withSpring2(closedOffset, SPRING2);
|
|
75
201
|
}
|
|
76
202
|
});
|
|
77
|
-
|
|
203
|
+
const edgeStyle = vertical ? [styles2.edgeHorizontal, side === "top" ? styles2.top : styles2.bottom] : [styles2.edgeVertical, side === "left" ? styles2.left : styles2.right];
|
|
204
|
+
return /* @__PURE__ */ jsx2(GestureDetector2, { gesture, children: /* @__PURE__ */ jsx2(View2, { style: edgeStyle }) });
|
|
78
205
|
};
|
|
79
206
|
var styles2 = StyleSheet2.create({
|
|
80
|
-
|
|
207
|
+
bottom: { bottom: 0 },
|
|
208
|
+
edgeHorizontal: {
|
|
209
|
+
height: EDGE_WIDTH,
|
|
210
|
+
left: 0,
|
|
211
|
+
position: "absolute",
|
|
212
|
+
right: 0,
|
|
213
|
+
zIndex: 5
|
|
214
|
+
},
|
|
215
|
+
edgeVertical: {
|
|
81
216
|
bottom: 0,
|
|
82
217
|
position: "absolute",
|
|
83
218
|
top: 0,
|
|
@@ -85,31 +220,58 @@ var styles2 = StyleSheet2.create({
|
|
|
85
220
|
zIndex: 5
|
|
86
221
|
},
|
|
87
222
|
left: { left: 0 },
|
|
88
|
-
right: { right: 0 }
|
|
223
|
+
right: { right: 0 },
|
|
224
|
+
top: { top: 0 }
|
|
89
225
|
});
|
|
90
226
|
|
|
91
227
|
// src/createDrawer.tsx
|
|
92
228
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
93
229
|
var noop = () => {
|
|
94
230
|
};
|
|
95
|
-
var createDrawer = ({ side = "left", width = 300 } = {}) => {
|
|
96
|
-
const DrawerActionsContext = createContext({ close: noop, isOpen: false, open: noop });
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
231
|
+
var createDrawer = ({ backdropOpacity: factoryBackdropOpacity, blockingBackdrop: factoryBlockingBackdrop, blur: factoryBlur, closeOnBackPress: factoryCloseOnBackPress, contentSize: factoryContentSize, dismissible: factoryDismissible, height = 300, showHandle: factoryShowHandle, side = "left", width = 300, zIndex: factoryZIndex } = {}) => {
|
|
232
|
+
const DrawerActionsContext = createContext({ close: noop, isOpen: false, isVisible: false, open: noop });
|
|
233
|
+
const vertical = isVerticalSide(side);
|
|
234
|
+
const size = vertical ? height : width;
|
|
235
|
+
const closedOffset = getClosedOffset(side, size);
|
|
236
|
+
const DrawerProvider = ({ backdropOpacity: backdropOpacityOverride, blockingBackdrop: blockingBackdropOverride, blur: blurOverride, children, closeOnBackPress: closeOnBackPressOverride, content, contentSize: contentSizeOverride, dismissible: dismissibleOverride, enabled = true, showHandle: showHandleOverride, zIndex: zIndexOverride }) => {
|
|
237
|
+
const [isOpen, setIsOpen] = useState2(false);
|
|
238
|
+
const [isVisible, setIsVisible] = useState2(false);
|
|
239
|
+
const [measuredSize, setMeasuredSize] = useState2(null);
|
|
240
|
+
const translateOffset = useSharedValue2(closedOffset);
|
|
241
|
+
const backdropOpacity = backdropOpacityOverride ?? factoryBackdropOpacity ?? 0.45;
|
|
242
|
+
const blur = blurOverride ?? factoryBlur;
|
|
243
|
+
const blockingBackdrop = blockingBackdropOverride ?? factoryBlockingBackdrop ?? true;
|
|
244
|
+
const closeOnBackPress = closeOnBackPressOverride ?? factoryCloseOnBackPress ?? true;
|
|
245
|
+
const contentSize = contentSizeOverride ?? factoryContentSize ?? false;
|
|
246
|
+
const dismissible = dismissibleOverride ?? factoryDismissible ?? true;
|
|
247
|
+
const showHandle = showHandleOverride ?? factoryShowHandle ?? true;
|
|
248
|
+
const zIndex = zIndexOverride ?? factoryZIndex ?? 50;
|
|
249
|
+
const effectiveSize = contentSize ? measuredSize ?? size : size;
|
|
250
|
+
const open = () => {
|
|
251
|
+
setIsOpen(true);
|
|
252
|
+
setIsVisible(true);
|
|
253
|
+
};
|
|
101
254
|
const actions = useMemo(
|
|
102
255
|
() => ({
|
|
103
256
|
close: () => setIsOpen(false),
|
|
104
257
|
isOpen,
|
|
105
|
-
|
|
258
|
+
isVisible,
|
|
259
|
+
open
|
|
106
260
|
}),
|
|
107
|
-
[isOpen]
|
|
261
|
+
[isOpen, isVisible]
|
|
108
262
|
);
|
|
263
|
+
useEffect2(() => {
|
|
264
|
+
if (!isOpen || !closeOnBackPress) return;
|
|
265
|
+
const subscription = BackHandler.addEventListener("hardwareBackPress", () => {
|
|
266
|
+
setIsOpen(false);
|
|
267
|
+
return true;
|
|
268
|
+
});
|
|
269
|
+
return () => subscription.remove();
|
|
270
|
+
}, [isOpen, closeOnBackPress]);
|
|
109
271
|
return /* @__PURE__ */ jsxs2(DrawerActionsContext.Provider, { value: actions, children: [
|
|
110
272
|
children,
|
|
111
|
-
/* @__PURE__ */ jsx3(DrawerEdgeSwipe, { enabled: enabled && !isOpen,
|
|
112
|
-
/* @__PURE__ */ jsx3(Drawer, { onClose: () => setIsOpen(false), open: isOpen, side,
|
|
273
|
+
/* @__PURE__ */ jsx3(DrawerEdgeSwipe, { enabled: enabled && !isOpen, height: vertical ? effectiveSize : height, onOpen: open, side, translateOffset, width: vertical ? width : effectiveSize }),
|
|
274
|
+
/* @__PURE__ */ jsx3(Drawer, { backdropOpacity, blockingBackdrop, blur, contentSize, dismissible, height: vertical ? effectiveSize : height, onClose: () => setIsOpen(false), onClosed: () => setIsVisible(false), onMeasure: setMeasuredSize, open: isOpen, showHandle, side, translateOffset, width: vertical ? width : effectiveSize, zIndex, children: content })
|
|
113
275
|
] });
|
|
114
276
|
};
|
|
115
277
|
const useDrawer = () => useContext(DrawerActionsContext);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rific/drawer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Left/right sliding drawer with edge-swipe gestures for React Native — spring-animated, theme-aware, one factory call per drawer instance",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"preversion": "npm run lint && npm test && npm run build"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
+
"@rific/auto-paper": "^0.7.0",
|
|
62
63
|
"@rific/haptic-press": "^0.4.3",
|
|
63
64
|
"@testing-library/dom": "^10.4.1",
|
|
64
65
|
"@testing-library/react": "^16.3.2",
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
"typescript-eslint": "^8.59.3"
|
|
88
89
|
},
|
|
89
90
|
"peerDependencies": {
|
|
91
|
+
"@rific/auto-paper": ">=0.7.0",
|
|
90
92
|
"@rific/haptic-press": ">=0.4.0",
|
|
91
93
|
"react": ">=18.0.0",
|
|
92
94
|
"react-native": ">=0.76.0",
|
|
@@ -94,6 +96,11 @@
|
|
|
94
96
|
"react-native-paper": ">=5.0.0",
|
|
95
97
|
"react-native-reanimated": ">=3.16.0"
|
|
96
98
|
},
|
|
99
|
+
"peerDependenciesMeta": {
|
|
100
|
+
"@rific/auto-paper": {
|
|
101
|
+
"optional": true
|
|
102
|
+
}
|
|
103
|
+
},
|
|
97
104
|
"publishConfig": {
|
|
98
105
|
"access": "public"
|
|
99
106
|
}
|