react-native-drawer-layout 4.0.0-alpha.1 → 4.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/lib/commonjs/constants.js +5 -9
  2. package/lib/commonjs/constants.js.map +1 -1
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/types.js.map +1 -1
  5. package/lib/commonjs/utils/DrawerGestureContext.js +3 -4
  6. package/lib/commonjs/utils/DrawerGestureContext.js.map +1 -1
  7. package/lib/commonjs/utils/DrawerProgressContext.js +3 -4
  8. package/lib/commonjs/utils/DrawerProgressContext.js.map +1 -1
  9. package/lib/commonjs/utils/useDrawerProgress.js +2 -2
  10. package/lib/commonjs/utils/useDrawerProgress.js.map +1 -1
  11. package/lib/commonjs/views/Drawer.js +285 -36
  12. package/lib/commonjs/views/Drawer.js.map +1 -1
  13. package/lib/commonjs/views/GestureHandler.android.js.map +1 -1
  14. package/lib/commonjs/views/GestureHandler.ios.js.map +1 -1
  15. package/lib/commonjs/views/GestureHandler.js +8 -12
  16. package/lib/commonjs/views/GestureHandler.js.map +1 -1
  17. package/lib/commonjs/views/GestureHandlerNative.js +2 -2
  18. package/lib/commonjs/views/GestureHandlerNative.js.map +1 -1
  19. package/lib/commonjs/views/{modern/Overlay.js → Overlay.js} +3 -4
  20. package/lib/commonjs/views/Overlay.js.map +1 -0
  21. package/lib/module/constants.js +1 -1
  22. package/lib/module/constants.js.map +1 -1
  23. package/lib/module/index.js.map +1 -1
  24. package/lib/module/types.js.map +1 -1
  25. package/lib/module/utils/DrawerGestureContext.js.map +1 -1
  26. package/lib/module/utils/DrawerProgressContext.js.map +1 -1
  27. package/lib/module/utils/useDrawerProgress.js.map +1 -1
  28. package/lib/module/views/Drawer.js +285 -37
  29. package/lib/module/views/Drawer.js.map +1 -1
  30. package/lib/module/views/GestureHandler.android.js.map +1 -1
  31. package/lib/module/views/GestureHandler.ios.js.map +1 -1
  32. package/lib/module/views/GestureHandler.js +3 -3
  33. package/lib/module/views/GestureHandler.js.map +1 -1
  34. package/lib/module/views/GestureHandlerNative.js.map +1 -1
  35. package/lib/module/views/Overlay.js.map +1 -0
  36. package/lib/typescript/src/constants.d.ts +1 -1
  37. package/lib/typescript/src/constants.d.ts.map +1 -1
  38. package/lib/typescript/src/types.d.ts +4 -0
  39. package/lib/typescript/src/types.d.ts.map +1 -1
  40. package/lib/typescript/src/utils/DrawerProgressContext.d.ts +1 -1
  41. package/lib/typescript/src/utils/DrawerProgressContext.d.ts.map +1 -1
  42. package/lib/typescript/src/utils/useDrawerProgress.d.ts +1 -1
  43. package/lib/typescript/src/utils/useDrawerProgress.d.ts.map +1 -1
  44. package/lib/typescript/src/views/Drawer.d.ts +2 -17
  45. package/lib/typescript/src/views/Drawer.d.ts.map +1 -1
  46. package/lib/typescript/src/views/GestureHandlerNative.d.ts +3 -2
  47. package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +1 -1
  48. package/lib/typescript/src/views/Overlay.d.ts +106 -0
  49. package/lib/typescript/src/views/Overlay.d.ts.map +1 -0
  50. package/package.json +10 -10
  51. package/src/constants.tsx +1 -1
  52. package/src/types.tsx +5 -0
  53. package/src/utils/DrawerProgressContext.tsx +1 -1
  54. package/src/utils/useDrawerProgress.tsx +1 -3
  55. package/src/views/Drawer.tsx +424 -62
  56. package/src/views/GestureHandlerNative.tsx +1 -1
  57. package/lib/commonjs/views/legacy/Drawer.js +0 -452
  58. package/lib/commonjs/views/legacy/Drawer.js.map +0 -1
  59. package/lib/commonjs/views/legacy/Overlay.js +0 -73
  60. package/lib/commonjs/views/legacy/Overlay.js.map +0 -1
  61. package/lib/commonjs/views/modern/Drawer.js +0 -308
  62. package/lib/commonjs/views/modern/Drawer.js.map +0 -1
  63. package/lib/commonjs/views/modern/Overlay.js.map +0 -1
  64. package/lib/module/views/legacy/Drawer.js +0 -442
  65. package/lib/module/views/legacy/Drawer.js.map +0 -1
  66. package/lib/module/views/legacy/Overlay.js +0 -63
  67. package/lib/module/views/legacy/Overlay.js.map +0 -1
  68. package/lib/module/views/modern/Drawer.js +0 -299
  69. package/lib/module/views/modern/Drawer.js.map +0 -1
  70. package/lib/module/views/modern/Overlay.js.map +0 -1
  71. package/lib/typescript/src/views/legacy/Drawer.d.ts +0 -51
  72. package/lib/typescript/src/views/legacy/Drawer.d.ts.map +0 -1
  73. package/lib/typescript/src/views/legacy/Overlay.d.ts +0 -104
  74. package/lib/typescript/src/views/legacy/Overlay.d.ts.map +0 -1
  75. package/lib/typescript/src/views/modern/Drawer.d.ts +0 -9
  76. package/lib/typescript/src/views/modern/Drawer.d.ts.map +0 -1
  77. package/lib/typescript/src/views/modern/Overlay.d.ts +0 -104
  78. package/lib/typescript/src/views/modern/Overlay.d.ts.map +0 -1
  79. package/src/views/legacy/Drawer.tsx +0 -690
  80. package/src/views/legacy/Overlay.tsx +0 -85
  81. package/src/views/modern/Drawer.tsx +0 -446
  82. /package/lib/module/views/{modern/Overlay.js → Overlay.js} +0 -0
  83. /package/src/views/{modern/Overlay.tsx → Overlay.tsx} +0 -0
@@ -1,19 +1,4 @@
1
- import { StyleProp, ViewStyle } from 'react-native';
1
+ import * as React from 'react';
2
2
  import type { DrawerProps } from '../types';
3
- type Props = DrawerProps & {
4
- /**
5
- * Whether to use the legacy implementation of the drawer.
6
- * The legacy implementation uses v1 of Reanimated.
7
- * The modern implementation uses v2 of Reanimated.
8
- *
9
- * By default, the appropriate implementation is used based on whether Reanimated v2 is configured.
10
- */
11
- useLegacyImplementation?: boolean;
12
- /**
13
- * Style object for the wrapper view.
14
- */
15
- style?: StyleProp<ViewStyle>;
16
- };
17
- export declare function Drawer({ useLegacyImplementation, layout: customLayout, drawerType, drawerPosition, drawerStyle, swipeEnabled, swipeEdgeWidth, swipeMinDistance, swipeMinVelocity, keyboardDismissMode, hideStatusBarOnOpen, statusBarAnimation, style, ...rest }: Props): JSX.Element;
18
- export {};
3
+ export declare function Drawer({ layout: customLayout, drawerPosition, drawerStyle, drawerType, gestureHandlerProps, hideStatusBarOnOpen, keyboardDismissMode, onClose, onOpen, onGestureStart, onGestureCancel, onGestureEnd, onTransitionStart, onTransitionEnd, open, overlayStyle, overlayAccessibilityLabel, statusBarAnimation, swipeEnabled, swipeEdgeWidth, swipeMinDistance, swipeMinVelocity, renderDrawerContent, children, style, }: DrawerProps): React.JSX.Element;
19
4
  //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,KAAK,KAAK,GAAG,WAAW,GAAG;IACzB;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAuBF,wBAAgB,MAAM,CAAC,EAGrB,uBAAsD,EACtD,MAAM,EAAE,YAAY,EACpB,UAAgE,EAChE,cAAoE,EACpE,WAAW,EACX,YAEyB,EACzB,cAAmB,EACnB,gBAAqC,EACrC,gBAAqC,EACrC,mBAA+B,EAC/B,mBAA2B,EAC3B,kBAA4B,EAC5B,KAAK,EACL,GAAG,IAAI,EACR,EAAE,KAAK,eAyCP"}
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4B/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAqC5C,wBAAgB,MAAM,CAAC,EACrB,MAAM,EAAE,YAAY,EACpB,cAAoE,EACpE,WAAW,EACX,UAAgE,EAChE,mBAAmB,EACnB,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,qBA8Wb"}
@@ -1,5 +1,6 @@
1
- import { PanGestureHandlerProperties } from 'react-native-gesture-handler';
2
- export declare function PanGestureHandler(props: PanGestureHandlerProperties): JSX.Element;
1
+ import * as React from 'react';
2
+ import { type PanGestureHandlerProperties } from 'react-native-gesture-handler';
3
+ export declare function PanGestureHandler(props: PanGestureHandlerProperties): React.JSX.Element;
3
4
  export type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';
4
5
  export { GestureHandlerRootView, State as GestureState, TapGestureHandler, } from 'react-native-gesture-handler';
5
6
  //# sourceMappingURL=GestureHandlerNative.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GestureHandlerNative.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandlerNative.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,2BAA2B,EAC5B,MAAM,8BAA8B,CAAC;AAItC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,2BAA2B,eAQnE;AAED,YAAY,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EACL,sBAAsB,EACtB,KAAK,IAAI,YAAY,EACrB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"GestureHandlerNative.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandlerNative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,8BAA8B,CAAC;AAItC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,2BAA2B,qBAQnE;AAED,YAAY,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EACL,sBAAsB,EACtB,KAAK,IAAI,YAAY,EACrB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,106 @@
1
+ import * as React from 'react';
2
+ import Animated from 'react-native-reanimated';
3
+ export declare const Overlay: React.ForwardRefExoticComponent<{
4
+ children?: React.ReactNode | Animated.SharedValue<React.ReactNode>;
5
+ hitSlop?: import("react-native").Insets | Animated.SharedValue<import("react-native").Insets | undefined> | undefined;
6
+ id?: string | Animated.SharedValue<string | undefined> | undefined;
7
+ onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | Animated.SharedValue<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
8
+ pointerEvents?: "none" | "box-none" | "box-only" | "auto" | Animated.SharedValue<"none" | "box-none" | "box-only" | "auto" | undefined> | undefined;
9
+ removeClippedSubviews?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
10
+ testID?: string | Animated.SharedValue<string | undefined> | undefined;
11
+ nativeID?: string | Animated.SharedValue<string | undefined> | undefined;
12
+ collapsable?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
13
+ needsOffscreenAlphaCompositing?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
14
+ renderToHardwareTextureAndroid?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
15
+ focusable?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
16
+ shouldRasterizeIOS?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
17
+ isTVSelectable?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
18
+ hasTVPreferredFocus?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
19
+ tvParallaxProperties?: import("react-native").TVParallaxProperties | Animated.SharedValue<import("react-native").TVParallaxProperties | undefined> | undefined;
20
+ tvParallaxShiftDistanceX?: number | Animated.SharedValue<number | undefined> | undefined;
21
+ tvParallaxShiftDistanceY?: number | Animated.SharedValue<number | undefined> | undefined;
22
+ tvParallaxTiltAngle?: number | Animated.SharedValue<number | undefined> | undefined;
23
+ tvParallaxMagnification?: number | Animated.SharedValue<number | undefined> | undefined;
24
+ onStartShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
25
+ onMoveShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
26
+ onResponderEnd?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
27
+ onResponderGrant?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
28
+ onResponderReject?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
29
+ onResponderMove?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
30
+ onResponderRelease?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
31
+ onResponderStart?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
32
+ onResponderTerminationRequest?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
33
+ onResponderTerminate?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
34
+ onStartShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
35
+ onMoveShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => boolean) | undefined> | undefined;
36
+ onTouchStart?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
37
+ onTouchMove?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
38
+ onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
39
+ onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
40
+ onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | Animated.SharedValue<((event: import("react-native").GestureResponderEvent) => void) | undefined> | undefined;
41
+ onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
42
+ onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
43
+ onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
44
+ onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
45
+ onPointerMove?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
46
+ onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
47
+ onPointerCancel?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
48
+ onPointerCancelCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
49
+ onPointerDown?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
50
+ onPointerDownCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
51
+ onPointerUp?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
52
+ onPointerUpCapture?: ((event: import("react-native").PointerEvent) => void) | Animated.SharedValue<((event: import("react-native").PointerEvent) => void) | undefined> | undefined;
53
+ accessible?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
54
+ accessibilityActions?: readonly Readonly<{
55
+ name: string;
56
+ label?: string | undefined;
57
+ }>[] | Animated.SharedValue<readonly Readonly<{
58
+ name: string;
59
+ label?: string | undefined;
60
+ }>[] | undefined> | undefined;
61
+ accessibilityLabel?: string | Animated.SharedValue<string | undefined> | undefined;
62
+ 'aria-label'?: string | Animated.SharedValue<string | undefined> | undefined;
63
+ accessibilityRole?: import("react-native").AccessibilityRole | Animated.SharedValue<import("react-native").AccessibilityRole | undefined> | undefined;
64
+ accessibilityState?: import("react-native").AccessibilityState | Animated.SharedValue<import("react-native").AccessibilityState | undefined> | undefined;
65
+ 'aria-busy'?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
66
+ 'aria-checked'?: boolean | "mixed" | Animated.SharedValue<boolean | "mixed" | undefined> | undefined;
67
+ 'aria-disabled'?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
68
+ 'aria-expanded'?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
69
+ 'aria-selected'?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
70
+ 'aria-labelledby'?: string | Animated.SharedValue<string | undefined> | undefined;
71
+ accessibilityHint?: string | Animated.SharedValue<string | undefined> | undefined;
72
+ accessibilityValue?: import("react-native").AccessibilityValue | Animated.SharedValue<import("react-native").AccessibilityValue | undefined> | undefined;
73
+ 'aria-valuemax'?: number | Animated.SharedValue<number | undefined> | undefined;
74
+ 'aria-valuemin'?: number | Animated.SharedValue<number | undefined> | undefined;
75
+ 'aria-valuenow'?: number | Animated.SharedValue<number | undefined> | undefined;
76
+ 'aria-valuetext'?: string | Animated.SharedValue<string | undefined> | undefined;
77
+ onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | Animated.SharedValue<((event: import("react-native").AccessibilityActionEvent) => void) | undefined> | undefined;
78
+ importantForAccessibility?: "auto" | "no-hide-descendants" | "yes" | "no" | Animated.SharedValue<"auto" | "no-hide-descendants" | "yes" | "no" | undefined> | undefined;
79
+ 'aria-hidden'?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
80
+ 'aria-live'?: "polite" | "assertive" | "off" | Animated.SharedValue<"polite" | "assertive" | "off" | undefined> | undefined;
81
+ 'aria-modal'?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
82
+ role?: import("react-native").Role | Animated.SharedValue<import("react-native").Role | undefined> | undefined;
83
+ accessibilityLiveRegion?: "none" | "polite" | "assertive" | Animated.SharedValue<"none" | "polite" | "assertive" | undefined> | undefined;
84
+ accessibilityLabelledBy?: string | string[] | Animated.SharedValue<string | string[] | undefined> | undefined;
85
+ accessibilityElementsHidden?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
86
+ accessibilityViewIsModal?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
87
+ onAccessibilityEscape?: (() => void) | Animated.SharedValue<(() => void) | undefined> | undefined;
88
+ onAccessibilityTap?: (() => void) | Animated.SharedValue<(() => void) | undefined> | undefined;
89
+ onMagicTap?: (() => void) | Animated.SharedValue<(() => void) | undefined> | undefined;
90
+ accessibilityIgnoresInvertColors?: boolean | Animated.SharedValue<boolean | undefined> | undefined;
91
+ accessibilityLanguage?: string | Animated.SharedValue<string | undefined> | undefined;
92
+ } & {
93
+ style?: import("react-native").StyleProp<Animated.AnimateStyle<import("react-native").StyleProp<import("react-native").ViewStyle>>>;
94
+ } & {
95
+ animatedProps?: Partial<Animated.AnimateProps<import("react-native").ViewProps>> | undefined;
96
+ layout?: import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").LayoutAnimationFunction | typeof import("react-native-reanimated").BaseAnimationBuilder | undefined;
97
+ entering?: import("react-native-reanimated").BaseAnimationBuilder | typeof import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").EntryExitAnimationFunction | import("react-native-reanimated").Keyframe | undefined;
98
+ exiting?: import("react-native-reanimated").BaseAnimationBuilder | typeof import("react-native-reanimated").BaseAnimationBuilder | import("react-native-reanimated").EntryExitAnimationFunction | import("react-native-reanimated").Keyframe | undefined;
99
+ sharedTransitionTag?: string | undefined;
100
+ sharedTransitionStyle?: import("react-native-reanimated").ILayoutAnimationBuilder | undefined;
101
+ } & {
102
+ progress: Animated.SharedValue<number>;
103
+ onPress: () => void;
104
+ accessibilityLabel?: string | undefined;
105
+ } & React.RefAttributes<Animated.View>>;
106
+ //# sourceMappingURL=Overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/views/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,QAGN,MAAM,yBAAyB,CAAC;AAUjC,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cALR,SAAS,WAAW,CAAC,MAAM,CAAC;aAC7B,MAAM,IAAI;;uCAgDnB,CAAC"}
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": "4.0.0-alpha.1",
4
+ "version": "4.0.0-alpha.2",
5
5
  "keywords": [
6
6
  "react-native-component",
7
7
  "react-component",
@@ -37,20 +37,20 @@
37
37
  "clean": "del lib"
38
38
  },
39
39
  "dependencies": {
40
- "use-latest-callback": "^0.1.5"
40
+ "use-latest-callback": "^0.1.9"
41
41
  },
42
42
  "devDependencies": {
43
- "del-cli": "^5.0.0",
43
+ "del-cli": "^5.1.0",
44
44
  "react": "18.2.0",
45
- "react-native": "0.71.8",
46
- "react-native-builder-bob": "^0.21.0",
47
- "typescript": "^4.9.4"
45
+ "react-native": "0.72.6",
46
+ "react-native-builder-bob": "^0.23.1",
47
+ "typescript": "^5.2.2"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "react": "*",
51
- "react-native": "*",
52
- "react-native-gesture-handler": ">= 1.0.0",
53
- "react-native-reanimated": ">= 1.0.0"
51
+ "react-native": "0.72.6",
52
+ "react-native-gesture-handler": "~2.12.0",
53
+ "react-native-reanimated": "~3.3.0"
54
54
  },
55
55
  "react-native-builder-bob": {
56
56
  "source": "src",
@@ -66,5 +66,5 @@
66
66
  ]
67
67
  ]
68
68
  },
69
- "gitHead": "ae0a70c2d94f77cd8ca8b8d3028f684a63f81b92"
69
+ "gitHead": "858a8746a5c007a623206c920f70d55935ed39b4"
70
70
  }
package/src/constants.tsx CHANGED
@@ -1,4 +1,4 @@
1
+ export const SWIPE_EDGE_WIDTH = 32;
1
2
  export const SWIPE_MIN_OFFSET = 5;
2
3
  export const SWIPE_MIN_DISTANCE = 60;
3
4
  export const SWIPE_MIN_VELOCITY = 500;
4
- export const DEFAULT_DRAWER_WIDTH = '80%';
package/src/types.tsx CHANGED
@@ -140,6 +140,11 @@ export type DrawerProps = {
140
140
  */
141
141
  gestureHandlerProps?: React.ComponentProps<typeof PanGestureHandler>;
142
142
 
143
+ /**
144
+ * Style object for the wrapper view.
145
+ */
146
+ style?: StyleProp<ViewStyle>;
147
+
143
148
  /**
144
149
  * Content that the drawer should wrap.
145
150
  */
@@ -2,5 +2,5 @@ import * as React from 'react';
2
2
  import type Animated from 'react-native-reanimated';
3
3
 
4
4
  export const DrawerProgressContext = React.createContext<
5
- Readonly<Animated.SharedValue<number>> | Animated.Node<number> | undefined
5
+ Readonly<Animated.SharedValue<number>> | undefined
6
6
  >(undefined);
@@ -3,9 +3,7 @@ import type Animated from 'react-native-reanimated';
3
3
 
4
4
  import { DrawerProgressContext } from './DrawerProgressContext';
5
5
 
6
- export function useDrawerProgress():
7
- | Readonly<Animated.SharedValue<number>>
8
- | Animated.Node<number> {
6
+ export function useDrawerProgress(): Readonly<Animated.SharedValue<number>> {
9
7
  const progress = React.useContext(DrawerProgressContext);
10
8
 
11
9
  if (progress === undefined) {