react-native-drawer-layout 4.2.4 → 4.2.6
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/views/Drawer.js +8 -4
- package/lib/module/views/Drawer.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/views/Drawer.d.ts +1 -1
- package/lib/typescript/src/views/Drawer.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer.native.d.ts +1 -1
- 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.ios.d.ts +1 -1
- package/lib/typescript/src/views/GestureHandler.ios.d.ts.map +1 -1
- package/lib/typescript/src/views/Overlay.d.ts +1 -1
- package/lib/typescript/src/views/Overlay.d.ts.map +1 -1
- package/lib/typescript/src/views/Overlay.native.d.ts +1 -1
- package/lib/typescript/src/views/Overlay.native.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/views/Drawer.tsx +8 -4
|
@@ -31,11 +31,15 @@ export function Drawer({
|
|
|
31
31
|
progress.value = open ? 1 : 0;
|
|
32
32
|
}, [open, progress]);
|
|
33
33
|
const drawerRef = React.useRef(null);
|
|
34
|
-
const onTransitionStartLatest = useLatestCallback(
|
|
35
|
-
|
|
34
|
+
const onTransitionStartLatest = useLatestCallback(e => {
|
|
35
|
+
if (e.target === e.currentTarget && e.propertyName === 'transform') {
|
|
36
|
+
onTransitionStart?.(open === false);
|
|
37
|
+
}
|
|
36
38
|
});
|
|
37
|
-
const onTransitionEndLatest = useLatestCallback(
|
|
38
|
-
|
|
39
|
+
const onTransitionEndLatest = useLatestCallback(e => {
|
|
40
|
+
if (e.target === e.currentTarget && e.propertyName === 'transform') {
|
|
41
|
+
onTransitionEnd?.(open === false);
|
|
42
|
+
}
|
|
39
43
|
});
|
|
40
44
|
React.useEffect(() => {
|
|
41
45
|
const element = drawerRef.current;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","useLatestCallback","DrawerProgressContext","getDrawerWidthWeb","useFakeSharedValue","Overlay","jsx","_jsx","jsxs","_jsxs","Drawer","direction","drawerPosition","drawerStyle","drawerType","onClose","onTransitionStart","onTransitionEnd","open","overlayStyle","overlayAccessibilityLabel","renderDrawerContent","children","style","drawerWidth","progress","useEffect","value","drawerRef","useRef","onTransitionStartLatest","onTransitionEndLatest","element","current","addEventListener","removeEventListener","isOpen","isRight","drawerTranslateX","drawerAnimatedStyle","transition","transform","contentTranslateX","contentAnimatedStyle","drawerElement","ref","styles","drawer","position","zIndex","width","right","left","mainContent","content","onPress","accessibilityLabel","Provider","container","create","flex","flexDirection","top","bottom","maxWidth","backgroundColor"],"sourceRoot":"../../../src","sources":["views/Drawer.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAwB,cAAc;AAC/D,OAAOC,iBAAiB,MAAM,qBAAqB;AAGnD,SAASC,qBAAqB,QAAQ,mCAAgC;AACtE,SAASC,iBAAiB,QAAQ,4BAAyB;AAC3D,SAASC,kBAAkB,QAAQ,gCAA6B;AAChE,SAASC,OAAO,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpC,OAAO,SAASC,MAAMA,CAAC;EACrBC,SAAS,GAAG,KAAK;EACjBC,cAAc,GAAGD,SAAS,KAAK,KAAK,GAAG,OAAO,GAAG,MAAM;EACvDE,WAAW;EACXC,UAAU,GAAG,OAAO;EACpBC,OAAO;EACPC,iBAAiB;EACjBC,eAAe;EACfC,IAAI;EACJC,YAAY;EACZC,yBAAyB;EACzBC,mBAAmB;EACnBC,QAAQ;EACRC;AACW,CAAC,EAAE;EACd,MAAMC,WAAW,GAAGrB,iBAAiB,CAAC;IACpCU;EACF,CAAC,CAAC;EAEF,MAAMY,QAAQ,GAAGrB,kBAAkB,CAACc,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;EAEjDpB,KAAK,CAAC4B,SAAS,CAAC,MAAM;IACpBD,QAAQ,CAACE,KAAK,GAAGT,IAAI,GAAG,CAAC,GAAG,CAAC;EAC/B,CAAC,EAAE,CAACA,IAAI,EAAEO,QAAQ,CAAC,CAAC;EAEpB,MAAMG,SAAS,GAAG9B,KAAK,CAAC+B,MAAM,CAAO,IAAI,CAAC;EAE1C,MAAMC,uBAAuB,GAAG7B,iBAAiB,CAAC,MAAM;
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","useLatestCallback","DrawerProgressContext","getDrawerWidthWeb","useFakeSharedValue","Overlay","jsx","_jsx","jsxs","_jsxs","Drawer","direction","drawerPosition","drawerStyle","drawerType","onClose","onTransitionStart","onTransitionEnd","open","overlayStyle","overlayAccessibilityLabel","renderDrawerContent","children","style","drawerWidth","progress","useEffect","value","drawerRef","useRef","onTransitionStartLatest","e","target","currentTarget","propertyName","onTransitionEndLatest","element","current","addEventListener","removeEventListener","isOpen","isRight","drawerTranslateX","drawerAnimatedStyle","transition","transform","contentTranslateX","contentAnimatedStyle","drawerElement","ref","styles","drawer","position","zIndex","width","right","left","mainContent","content","onPress","accessibilityLabel","Provider","container","create","flex","flexDirection","top","bottom","maxWidth","backgroundColor"],"sourceRoot":"../../../src","sources":["views/Drawer.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAwB,cAAc;AAC/D,OAAOC,iBAAiB,MAAM,qBAAqB;AAGnD,SAASC,qBAAqB,QAAQ,mCAAgC;AACtE,SAASC,iBAAiB,QAAQ,4BAAyB;AAC3D,SAASC,kBAAkB,QAAQ,gCAA6B;AAChE,SAASC,OAAO,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,I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ACrB;EAAC,CACuB,CAAC;AAErC;AAEA,MAAME,MAAM,GAAGnD,UAAU,CAACgE,MAAM,CAAC;EAC/BD,SAAS,EAAE;IACTE,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACDd,MAAM,EAAE;IACNe,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,MAAM;IAChBC,eAAe,EAAE;EACnB,CAAC;EACDX,OAAO,EAAE;IACPM,IAAI,EAAE;EACR;AACF,CAAC,CAAC","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,3 +1,3 @@
|
|
|
1
|
-
import type { DrawerProps } from '../types';
|
|
1
|
+
import type { DrawerProps } from '../types.js';
|
|
2
2
|
export declare function Drawer({ direction, drawerPosition, drawerStyle, drawerType, onClose, onTransitionStart, onTransitionEnd, open, overlayStyle, overlayAccessibilityLabel, renderDrawerContent, children, style, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.tsx"],"names":[],"mappings":"AAIA,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,2CAiIb"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { DrawerProps } from '../types';
|
|
1
|
+
import type { DrawerProps } from '../types.js';
|
|
2
2
|
export declare function Drawer({ layout: customLayout, 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): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# 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":"AAsBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Drawer.native.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.native.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAU,CAAC;AAuB5C,wBAAgB,MAAM,CAAC,EACrB,MAAM,EAAE,YAAY,EACpB,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,2CAgbb"}
|
|
@@ -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,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
|
-
import type { OverlayProps } from '../types';
|
|
1
|
+
import type { OverlayProps } from '../types.js';
|
|
2
2
|
export declare function Overlay({ open, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react/jsx-runtime").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,2CAoBd"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { OverlayProps } from '../types';
|
|
1
|
+
import type { OverlayProps } from '../types.js';
|
|
2
2
|
export declare function Overlay({ progress, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react/jsx-runtime").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,2CA+Bd"}
|
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.2.
|
|
4
|
+
"version": "4.2.6",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"del-cli": "^6.0.0",
|
|
54
54
|
"react": "19.1.0",
|
|
55
55
|
"react-native": "0.81.5",
|
|
56
|
-
"react-native-builder-bob": "^0.
|
|
56
|
+
"react-native-builder-bob": "^0.42.1",
|
|
57
57
|
"react-native-reanimated": "^3.19.4",
|
|
58
58
|
"typescript": "^5.9.2"
|
|
59
59
|
},
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
]
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "8a863290c256c426a03b0298d8b1568420d7a400"
|
|
85
85
|
}
|
package/src/views/Drawer.tsx
CHANGED
|
@@ -35,12 +35,16 @@ export function Drawer({
|
|
|
35
35
|
|
|
36
36
|
const drawerRef = React.useRef<View>(null);
|
|
37
37
|
|
|
38
|
-
const onTransitionStartLatest = useLatestCallback(() => {
|
|
39
|
-
|
|
38
|
+
const onTransitionStartLatest = useLatestCallback((e: TransitionEvent) => {
|
|
39
|
+
if (e.target === e.currentTarget && e.propertyName === 'transform') {
|
|
40
|
+
onTransitionStart?.(open === false);
|
|
41
|
+
}
|
|
40
42
|
});
|
|
41
43
|
|
|
42
|
-
const onTransitionEndLatest = useLatestCallback(() => {
|
|
43
|
-
|
|
44
|
+
const onTransitionEndLatest = useLatestCallback((e: TransitionEvent) => {
|
|
45
|
+
if (e.target === e.currentTarget && e.propertyName === 'transform') {
|
|
46
|
+
onTransitionEnd?.(open === false);
|
|
47
|
+
}
|
|
44
48
|
});
|
|
45
49
|
|
|
46
50
|
React.useEffect(() => {
|