react-native-drawer-layout 5.0.0-alpha.1 → 5.0.0-alpha.3
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/useDrawerProgress.js +1 -1
- package/lib/module/utils/useDrawerProgress.js.map +1 -1
- package/lib/typescript/src/types.d.ts +21 -21
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/types.tsx +21 -21
- package/src/utils/useDrawerProgress.tsx +1 -1
|
@@ -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":[]}
|
|
@@ -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
115
|
* Function to modify the pan gesture handler via RNGH properties API.
|
|
116
116
|
*/
|
|
117
|
-
configureGestureHandler?: (gesture: PanGesture) => PanGesture;
|
|
117
|
+
configureGestureHandler?: ((gesture: PanGesture) => PanGesture) | 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,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"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"}
|
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.3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"del-cli": "^6.0.0",
|
|
50
|
-
"react": "19.
|
|
51
|
-
"react-native": "0.
|
|
50
|
+
"react": "19.2.0",
|
|
51
|
+
"react-native": "0.83.2",
|
|
52
52
|
"react-native-builder-bob": "^0.40.12",
|
|
53
|
-
"react-native-reanimated": "4.1
|
|
54
|
-
"react-native-worklets": "0.
|
|
53
|
+
"react-native-reanimated": "~4.2.1",
|
|
54
|
+
"react-native-worklets": "0.7.2",
|
|
55
55
|
"typescript": "^5.9.2"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"react": ">= 19.
|
|
58
|
+
"react": ">= 19.2.0",
|
|
59
59
|
"react-native": "*",
|
|
60
60
|
"react-native-gesture-handler": ">= 2.0.0",
|
|
61
61
|
"react-native-reanimated": ">= 4.0.0"
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
]
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "1f1525607d00eb924e466889ec0e703a3f5474b7"
|
|
82
82
|
}
|
package/src/types.tsx
CHANGED
|
@@ -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,79 @@ 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
138
|
* Function to modify the pan gesture handler via RNGH properties API.
|
|
139
139
|
*/
|
|
140
|
-
configureGestureHandler?: (gesture: PanGesture) => PanGesture;
|
|
140
|
+
configureGestureHandler?: ((gesture: PanGesture) => PanGesture) | undefined;
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* Style object for the wrapper view.
|
|
144
144
|
*/
|
|
145
|
-
style?: StyleProp<ViewStyle
|
|
145
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
* Content that the drawer should wrap.
|
|
@@ -154,5 +154,5 @@ export type OverlayProps = React.ComponentProps<typeof View> & {
|
|
|
154
154
|
open: boolean;
|
|
155
155
|
progress: SharedValue<number>;
|
|
156
156
|
onPress: () => void;
|
|
157
|
-
accessibilityLabel?: string;
|
|
157
|
+
accessibilityLabel?: string | undefined;
|
|
158
158
|
};
|
|
@@ -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(
|