react-native-drawer-layout 4.0.1 → 4.0.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.
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.1",
4
+ "version": "4.0.2",
5
5
  "keywords": [
6
6
  "react-native-component",
7
7
  "react-component",
@@ -52,8 +52,8 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "del-cli": "^5.1.0",
55
- "react": "18.2.0",
56
- "react-native": "0.74.5",
55
+ "react": "18.3.1",
56
+ "react-native": "0.76.2",
57
57
  "react-native-builder-bob": "^0.29.0",
58
58
  "typescript": "^5.5.2"
59
59
  },
@@ -88,5 +88,5 @@
88
88
  ]
89
89
  ]
90
90
  },
91
- "gitHead": "10d8beb6a843d7f5c8585cae9d81b7c29e2fed2b"
91
+ "gitHead": "9ed7f88db02bf6b2565d575f79bd2feb0ceae1fa"
92
92
  }
@@ -20,6 +20,14 @@ class FakeSharedValue {
20
20
  this.value = modifier !== undefined ? modifier(this.value) : this.value;
21
21
  }
22
22
 
23
+ get() {
24
+ return this.value;
25
+ }
26
+
27
+ set(value: number) {
28
+ this.value = value;
29
+ }
30
+
23
31
  set value(value: number) {
24
32
  this._value = value;
25
33
 
@@ -334,7 +334,14 @@ export function Drawer({
334
334
  },
335
335
  ],
336
336
  };
337
- });
337
+ }, [
338
+ direction,
339
+ drawerPosition,
340
+ drawerType,
341
+ drawerWidth,
342
+ layout.width,
343
+ translateX,
344
+ ]);
338
345
 
339
346
  const contentAnimatedStyle = useAnimatedStyle(() => {
340
347
  return {
@@ -354,7 +361,7 @@ export function Drawer({
354
361
  },
355
362
  ],
356
363
  };
357
- });
364
+ }, [drawerPosition, drawerType, drawerWidth, translateX]);
358
365
 
359
366
  const progress = useDerivedValue(() => {
360
367
  return drawerType === 'permanent'
@@ -22,7 +22,7 @@ export function Overlay({
22
22
  // We can send the overlay behind the screen to avoid it
23
23
  zIndex: progress.value > PROGRESS_EPSILON ? 0 : -1,
24
24
  };
25
- });
25
+ }, [progress]);
26
26
 
27
27
  const animatedProps = useAnimatedProps(() => {
28
28
  const active = progress.value > PROGRESS_EPSILON;
@@ -32,7 +32,7 @@ export function Overlay({
32
32
  accessibilityElementsHidden: !active,
33
33
  importantForAccessibility: active ? 'auto' : 'no-hide-descendants',
34
34
  } as const;
35
- });
35
+ }, [progress]);
36
36
 
37
37
  return (
38
38
  <Animated.View