@react-navigation/drawer 8.0.0-alpha.56 → 8.0.0-alpha.58

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import { HeaderButton, PlatformIcon } from '@react-navigation/elements';
4
- import { DrawerActions, useNavigation } from '@react-navigation/native';
4
+ import { DrawerActions, MaterialSymbol, useNavigation } from '@react-navigation/native';
5
5
  import * as React from 'react';
6
6
  import { Platform, StyleSheet } from 'react-native';
7
7
  import toggleDrawerIcon from './assets/toggle-drawer-icon.png';
@@ -18,9 +18,12 @@ export function DrawerToggleButton({
18
18
  type: 'sfSymbol',
19
19
  name: 'line.3.horizontal'
20
20
  },
21
- android: {
21
+ android: MaterialSymbol.isAvailable() ? {
22
22
  type: 'materialSymbol',
23
23
  name: 'menu'
24
+ } : {
25
+ type: 'image',
26
+ source: toggleDrawerIcon
24
27
  },
25
28
  default: {
26
29
  type: 'image',
@@ -1 +1 @@
1
- {"version":3,"names":["HeaderButton","PlatformIcon","DrawerActions","useNavigation","React","Platform","StyleSheet","toggleDrawerIcon","jsx","_jsx","DrawerToggleButton","icon","tintColor","accessibilityLabel","rest","navigation","drawerIcon","select","ios","type","name","android","default","source","onPress","dispatch","toggleDrawer","children","size","ICON_SIZE","color","style","styles","create","height","width","marginVertical","marginHorizontal"],"sourceRoot":"../../../src","sources":["views/DrawerToggleButton.tsx"],"mappings":";;AAAA,SACEA,YAAY,EAEZC,YAAY,QACP,4BAA4B;AACnC,SAASC,aAAa,EAAEC,aAAa,QAAQ,0BAA0B;AACvE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAA0BC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAEpE,OAAOC,gBAAgB,MAAM,iCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAc/D,OAAO,SAASC,kBAAkBA,CAAC;EACjCC,IAAI;EACJC,SAAS;EACTC,kBAAkB,GAAG,sBAAsB;EAC3C,GAAGC;AACE,CAAC,EAAE;EACR,MAAMC,UAAU,GAAGZ,aAAa,CAAC,CAAC;EAElC,MAAMa,UAAU,GACdL,IAAI,IACJN,QAAQ,CAACY,MAAM,CAAO;IACpBC,GAAG,EAAE;MACHC,IAAI,EAAE,UAAU;MAChBC,IAAI,EAAE;IACR,CAAC;IACDC,OAAO,EAAE;MACPF,IAAI,EAAE,gBAAgB;MACtBC,IAAI,EAAE;IACR,CAAC;IACDE,OAAO,EAAE;MACPH,IAAI,EAAE,OAAO;MACbI,MAAM,EAAEhB;IACV;EACF,CAAC,CAAC;EAEJ,oBACEE,IAAA,CAACT,YAAY;IAAA,GACPc,IAAI;IACRD,kBAAkB,EAAEA,kBAAmB;IACvCW,OAAO,EAAEA,CAAA,KAAMT,UAAU,CAACU,QAAQ,CAACvB,aAAa,CAACwB,YAAY,CAAC,CAAC,CAAE;IAAAC,QAAA,EAEhE,OAAOX,UAAU,KAAK,UAAU,GAC/BA,UAAU,CAAC;MAAEJ;IAAU,CAAC,CAAC,gBAEzBH,IAAA,CAACR,YAAY;MACXU,IAAI,EAAEK,UAAW;MACjBY,IAAI,EAAEC,SAAU;MAChBC,KAAK,EAAElB,SAAU;MACjBmB,KAAK,EAAEC,MAAM,CAACrB;IAAK,CACpB;EACF,CACW,CAAC;AAEnB;AAEA,MAAMkB,SAAS,GAAG,EAAE;AAEpB,MAAMG,MAAM,GAAG1B,UAAU,CAAC2B,MAAM,CAAC;EAC/BtB,IAAI,EAAE;IACJuB,MAAM,EAAEL,SAAS;IACjBM,KAAK,EAAEN,SAAS;IAChBO,cAAc,EAAE,CAAC;IACjBC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["HeaderButton","PlatformIcon","DrawerActions","MaterialSymbol","useNavigation","React","Platform","StyleSheet","toggleDrawerIcon","jsx","_jsx","DrawerToggleButton","icon","tintColor","accessibilityLabel","rest","navigation","drawerIcon","select","ios","type","name","android","isAvailable","source","default","onPress","dispatch","toggleDrawer","children","size","ICON_SIZE","color","style","styles","create","height","width","marginVertical","marginHorizontal"],"sourceRoot":"../../../src","sources":["views/DrawerToggleButton.tsx"],"mappings":";;AAAA,SACEA,YAAY,EAEZC,YAAY,QACP,4BAA4B;AACnC,SACEC,aAAa,EACbC,cAAc,EACdC,aAAa,QACR,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAA0BC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAEpE,OAAOC,gBAAgB,MAAM,iCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAc/D,OAAO,SAASC,kBAAkBA,CAAC;EACjCC,IAAI;EACJC,SAAS;EACTC,kBAAkB,GAAG,sBAAsB;EAC3C,GAAGC;AACE,CAAC,EAAE;EACR,MAAMC,UAAU,GAAGZ,aAAa,CAAC,CAAC;EAElC,MAAMa,UAAU,GACdL,IAAI,IACJN,QAAQ,CAACY,MAAM,CAAO;IACpBC,GAAG,EAAE;MACHC,IAAI,EAAE,UAAU;MAChBC,IAAI,EAAE;IACR,CAAC;IACDC,OAAO,EAAEnB,cAAc,CAACoB,WAAW,CAAC,CAAC,GACjC;MACEH,IAAI,EAAE,gBAAgB;MACtBC,IAAI,EAAE;IACR,CAAC,GACD;MACED,IAAI,EAAE,OAAO;MACbI,MAAM,EAAEhB;IACV,CAAC;IACLiB,OAAO,EAAE;MACPL,IAAI,EAAE,OAAO;MACbI,MAAM,EAAEhB;IACV;EACF,CAAC,CAAC;EAEJ,oBACEE,IAAA,CAACV,YAAY;IAAA,GACPe,IAAI;IACRD,kBAAkB,EAAEA,kBAAmB;IACvCY,OAAO,EAAEA,CAAA,KAAMV,UAAU,CAACW,QAAQ,CAACzB,aAAa,CAAC0B,YAAY,CAAC,CAAC,CAAE;IAAAC,QAAA,EAEhE,OAAOZ,UAAU,KAAK,UAAU,GAC/BA,UAAU,CAAC;MAAEJ;IAAU,CAAC,CAAC,gBAEzBH,IAAA,CAACT,YAAY;MACXW,IAAI,EAAEK,UAAW;MACjBa,IAAI,EAAEC,SAAU;MAChBC,KAAK,EAAEnB,SAAU;MACjBoB,KAAK,EAAEC,MAAM,CAACtB;IAAK,CACpB;EACF,CACW,CAAC;AAEnB;AAEA,MAAMmB,SAAS,GAAG,EAAE;AAEpB,MAAMG,MAAM,GAAG3B,UAAU,CAAC4B,MAAM,CAAC;EAC/BvB,IAAI,EAAE;IACJwB,MAAM,EAAEL,SAAS;IACjBM,KAAK,EAAEN,SAAS;IAChBO,cAAc,EAAE,CAAC;IACjBC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -15,6 +15,55 @@ import { DrawerContent } from "./DrawerContent.js";
15
15
  import { DrawerToggleButton } from "./DrawerToggleButton.js";
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
17
  const DRAWER_BORDER_RADIUS = 16;
18
+ const DrawerScene = /*#__PURE__*/React.memo(function DrawerScene({
19
+ descriptor,
20
+ isFocused,
21
+ mode,
22
+ drawerPosition
23
+ }) {
24
+ const {
25
+ header = ({
26
+ route,
27
+ options
28
+ }) => /*#__PURE__*/_jsx(Header, {
29
+ ...options,
30
+ title: getHeaderTitle(options, route.name),
31
+ headerLeft: drawerPosition === 'left' && options.headerLeft == null ? props => /*#__PURE__*/_jsx(DrawerToggleButton, {
32
+ ...props
33
+ }) : options.headerLeft,
34
+ headerRight: drawerPosition === 'right' && options.headerRight == null ? props => /*#__PURE__*/_jsx(DrawerToggleButton, {
35
+ ...props
36
+ }) : options.headerRight
37
+ }),
38
+ headerShown,
39
+ headerStatusBarHeight,
40
+ headerTransparent,
41
+ sceneStyle
42
+ } = descriptor.options;
43
+ return /*#__PURE__*/_jsx(ActivityView, {
44
+ mode: mode,
45
+ visible: isFocused,
46
+ style: {
47
+ ...StyleSheet.absoluteFill,
48
+ zIndex: isFocused ? 0 : -1
49
+ },
50
+ children: /*#__PURE__*/_jsx(ScreenContent, {
51
+ focused: isFocused,
52
+ route: descriptor.route,
53
+ navigation: descriptor.navigation,
54
+ headerShown: headerShown,
55
+ headerStatusBarHeight: headerStatusBarHeight,
56
+ headerTransparent: headerTransparent,
57
+ header: header({
58
+ route: descriptor.route,
59
+ navigation: descriptor.navigation,
60
+ options: descriptor.options
61
+ }),
62
+ style: sceneStyle,
63
+ children: descriptor.render()
64
+ })
65
+ });
66
+ });
18
67
  const renderDrawerContentDefault = props => /*#__PURE__*/_jsx(DrawerContent, {
19
68
  ...props
20
69
  });
@@ -173,50 +222,17 @@ function DrawerViewBase({
173
222
  return null;
174
223
  }
175
224
  const {
176
- inactiveBehavior = 'pause',
177
- header = ({
178
- options
179
- }) => /*#__PURE__*/_jsx(Header, {
180
- ...options,
181
- title: getHeaderTitle(options, route.name),
182
- headerLeft: drawerPosition === 'left' && options.headerLeft == null ? props => /*#__PURE__*/_jsx(DrawerToggleButton, {
183
- ...props
184
- }) : options.headerLeft,
185
- headerRight: drawerPosition === 'right' && options.headerRight == null ? props => /*#__PURE__*/_jsx(DrawerToggleButton, {
186
- ...props
187
- }) : options.headerRight
188
- }),
189
- headerShown,
190
- headerStatusBarHeight,
191
- headerTransparent,
192
- sceneStyle
225
+ inactiveBehavior = 'pause'
193
226
  } = descriptor.options;
194
227
 
195
228
  // For preloaded screens and if lazy is false,
196
229
  // Keep them active so that the effects can run
197
230
  const isActive = inactiveBehavior === 'none' || isFocused || isPreloaded || lazy === false && !loaded.includes(route.key);
198
- return /*#__PURE__*/_jsx(ActivityView, {
231
+ return /*#__PURE__*/_jsx(DrawerScene, {
232
+ descriptor: descriptor,
233
+ isFocused: isFocused,
199
234
  mode: isFocused ? 'normal' : isActive ? 'inert' : 'paused',
200
- visible: isFocused,
201
- style: {
202
- ...StyleSheet.absoluteFill,
203
- zIndex: isFocused ? 0 : -1
204
- },
205
- children: /*#__PURE__*/_jsx(ScreenContent, {
206
- focused: isFocused,
207
- route: descriptor.route,
208
- navigation: descriptor.navigation,
209
- headerShown: headerShown,
210
- headerStatusBarHeight: headerStatusBarHeight,
211
- headerTransparent: headerTransparent,
212
- header: header({
213
- route: descriptor.route,
214
- navigation: descriptor.navigation,
215
- options: descriptor.options
216
- }),
217
- style: sceneStyle,
218
- children: descriptor.render()
219
- })
235
+ drawerPosition: drawerPosition
220
236
  }, route.key);
221
237
  })
222
238
  });
@@ -1 +1 @@
1
- {"version":3,"names":["getHeaderTitle","Header","ActivityView","Container","SafeAreaProviderCompat","Screen","ScreenContent","DrawerActions","StackActions","useLocale","useTheme","React","Platform","StyleSheet","Drawer","useLatestCallback","addCancelListener","DrawerPositionContext","DrawerStatusContext","getDrawerStatusFromState","DrawerContent","DrawerToggleButton","jsx","_jsx","DRAWER_BORDER_RADIUS","renderDrawerContentDefault","props","DrawerViewBase","state","navigation","descriptors","defaultStatus","drawerContent","direction","focusedRoute","routes","index","Error","focusedRouteKey","key","focusedOptions","options","drawerHideStatusBarOnOpen","drawerPosition","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","default","configureGestureHandler","keyboardDismissMode","swipeEdgeWidth","swipeEnabled","OS","swipeMinDistance","overlayStyle","overlayAccessibilityLabel","loaded","setLoaded","useState","includes","previousRouteKeyRef","useRef","useEffect","previousRouteKey","current","popToTopOnBlur","currentState","getState","prevRoute","find","route","type","length","history","dispatch","popToTop","target","colors","drawerStatus","handleDrawerOpen","openDrawer","handleDrawerClose","closeDrawer","handleGestureStart","emit","handleGestureEnd","handleGestureCancel","handleTransitionStart","closing","data","handleTransitionEnd","handleHardwareBack","isFocused","renderDrawerContent","Provider","value","children","renderSceneContent","style","styles","content","map","descriptor","lazy","isPreloaded","preloadedRouteKeys","inactiveBehavior","header","title","name","headerLeft","headerRight","headerShown","headerStatusBarHeight","headerTransparent","sceneStyle","isActive","mode","visible","absoluteFill","zIndex","focused","render","open","onOpen","onClose","onGestureStart","onGestureEnd","onGestureCancel","onTransitionStart","onTransitionEnd","hideStatusBarOnOpen","statusBarAnimation","backgroundColor","card","borderLeftColor","border","borderLeftWidth","hairlineWidth","borderRightColor","borderRightWidth","borderTopRightRadius","borderBottomRightRadius","borderTopLeftRadius","borderBottomLeftRadius","DrawerView","rest","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerView.tsx"],"mappings":";;AAAA,SAASA,cAAc,EAAEC,MAAM,QAAQ,4BAA4B;AACnE,SACEC,YAAY,EACZC,SAAS,EACTC,sBAAsB,EACtBC,MAAM,IAAIC,aAAa,QAClB,qCAAqC;AAC5C,SACEC,aAAa,EAIbC,YAAY,EACZC,SAAS,EACTC,QAAQ,QACH,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AACnD,SAASC,MAAM,QAAQ,4BAA4B;AACnD,OAAOC,iBAAiB,MAAM,qBAAqB;AAUnD,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,qBAAqB,QAAQ,mCAAgC;AACtE,SAASC,mBAAmB,QAAQ,iCAA8B;AAClE,SAASC,wBAAwB,QAAQ,sCAAmC;AAC5E,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,kBAAkB,QAAQ,yBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS1D,MAAMC,oBAAoB,GAAG,EAAE;AAE/B,MAAMC,0BAA0B,GAAIC,KAAkC,iBACpEH,IAAA,CAACH,aAAa;EAAA,GAAKM;AAAK,CAAG,CAC5B;AAED,SAASC,cAAcA,CAAC;EACtBC,KAAK;EACLC,UAAU;EACVC,WAAW;EACXC,aAAa;EACbC,aAAa,GAAGP;AACX,CAAC,EAAE;EACR,MAAM;IAAEQ;EAAU,CAAC,GAAGxB,SAAS,CAAC,CAAC;EAEjC,MAAMyB,YAAY,GAAGN,KAAK,CAACO,MAAM,CAACP,KAAK,CAACQ,KAAK,CAAC;EAE9C,IAAIF,YAAY,IAAI,IAAI,EAAE;IACxB,MAAM,IAAIG,KAAK,CAAC,kCAAkCT,KAAK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AAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getHeaderTitle","Header","ActivityView","Container","SafeAreaProviderCompat","Screen","ScreenContent","DrawerActions","StackActions","useLocale","useTheme","React","Platform","StyleSheet","Drawer","useLatestCallback","addCancelListener","DrawerPositionContext","DrawerStatusContext","getDrawerStatusFromState","DrawerContent","DrawerToggleButton","jsx","_jsx","DRAWER_BORDER_RADIUS","DrawerScene","memo","descriptor","isFocused","mode","drawerPosition","header","route","options","title","name","headerLeft","props","headerRight","headerShown","headerStatusBarHeight","headerTransparent","sceneStyle","visible","style","absoluteFill","zIndex","children","focused","navigation","render","renderDrawerContentDefault","DrawerViewBase","state","descriptors","defaultStatus","drawerContent","direction","focusedRoute","routes","index","Error","focusedRouteKey","key","focusedOptions","drawerHideStatusBarOnOpen","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","default","configureGestureHandler","keyboardDismissMode","swipeEdgeWidth","swipeEnabled","OS","swipeMinDistance","overlayStyle","overlayAccessibilityLabel","loaded","setLoaded","useState","includes","previousRouteKeyRef","useRef","useEffect","previousRouteKey","current","popToTopOnBlur","currentState","getState","prevRoute","find","type","length","history","dispatch","popToTop","target","colors","drawerStatus","handleDrawerOpen","openDrawer","handleDrawerClose","closeDrawer","handleGestureStart","emit","handleGestureEnd","handleGestureCancel","handleTransitionStart","closing","data","handleTransitionEnd","handleHardwareBack","renderDrawerContent","Provider","value","renderSceneContent","styles","content","map","lazy","isPreloaded","preloadedRouteKeys","inactiveBehavior","isActive","open","onOpen","onClose","onGestureStart","onGestureEnd","onGestureCancel","onTransitionStart","onTransitionEnd","hideStatusBarOnOpen","statusBarAnimation","backgroundColor","card","borderLeftColor","border","borderLeftWidth","hairlineWidth","borderRightColor","borderRightWidth","borderTopRightRadius","borderBottomRightRadius","borderTopLeftRadius","borderBottomLeftRadius","DrawerView","rest","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerView.tsx"],"mappings":";;AAAA,SAASA,cAA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c;MAACH,UAAU,EAAEA,UAAW;MAAA,GAAKqG;IAAI,CAAG;EAAC,CAC9B,CAAC;AAE7B;AAEA,MAAM/B,MAAM,GAAG1G,UAAU,CAAC0I,MAAM,CAAC;EAC/B/B,OAAO,EAAE;IACPgC,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -97,7 +97,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
97
97
  drawerPosition?: 'left' | 'right' | undefined;
98
98
  /**
99
99
  * Type of the drawer. It determines how the drawer looks and animates.
100
- * - `front`: Traditional drawer which covers the screen with a overlay behind it.
100
+ * - `front`: Traditional drawer which covers the screen with an overlay behind it.
101
101
  * - `back`: The drawer is revealed behind the screen on swipe.
102
102
  * - `slide`: Both the screen and the drawer slide on swipe to reveal the drawer.
103
103
  * - `permanent`: A permanent drawer is shown as a sidebar.
@@ -147,7 +147,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
147
147
  */
148
148
  swipeMinDistance?: number | undefined;
149
149
  /**
150
- * Whether the keyboard should be dismissed when the swipe gesture begins.
150
+ * Whether the keyboard should be dismissed when the drawer starts opening or closing.
151
151
  * Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.
152
152
  */
153
153
  keyboardDismissMode?: 'on-drag' | 'none' | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,EAEV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,UAAU,EAAwB,MAAM,cAAc,CAAC;AAIrE,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EACD,IAAI,GACJ,CAAC,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,UAAU,GAAG,SAAS,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,GACnE,SAAS,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,SAAS,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,SAAS,EACT,kBAA2C,EAC3C,GAAG,IAAI,EACR,EAAE,KAAK,qBAsCP"}
1
+ {"version":3,"file":"DrawerToggleButton.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,EAEV,MAAM,4BAA4B,CAAC;AAMpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,UAAU,EAAwB,MAAM,cAAc,CAAC;AAIrE,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EACD,IAAI,GACJ,CAAC,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,UAAU,GAAG,SAAS,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,GACnE,SAAS,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,SAAS,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,SAAS,EACT,kBAA2C,EAC3C,GAAG,IAAI,EACR,EAAE,KAAK,qBA2CP"}
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,aAAa,EAInB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAEV,mBAAmB,EAEnB,sBAAsB,EACtB,uBAAuB,EAExB,MAAM,aAAU,CAAC;AAQlB,KAAK,KAAK,GAAG,sBAAsB,GAAG;IACpC,aAAa,EAAE,YAAY,CAAC;IAC5B,KAAK,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAC5C,UAAU,EAAE,uBAAuB,CAAC;IACpC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AA0UF,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAMxD"}
1
+ {"version":3,"file":"DrawerView.d.ts","sourceRoot":"","sources":["../../../../src/views/DrawerView.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,KAAK,aAAa,EAInB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAGV,mBAAmB,EAEnB,sBAAsB,EACtB,uBAAuB,EAExB,MAAM,aAAU,CAAC;AAQlB,KAAK,KAAK,GAAG,sBAAsB,GAAG;IACpC,aAAa,EAAE,YAAY,CAAC;IAC5B,KAAK,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAC5C,UAAU,EAAE,uBAAuB,CAAC;IACpC,WAAW,EAAE,mBAAmB,CAAC;CAClC,CAAC;AAkWF,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,qBAMxD"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-navigation/drawer",
3
3
  "description": "Integration for the drawer component from react-native-drawer-layout",
4
- "version": "8.0.0-alpha.56",
4
+ "version": "8.0.0-alpha.58",
5
5
  "keywords": [
6
6
  "react-native-component",
7
7
  "react-component",
@@ -46,13 +46,13 @@
46
46
  "clean": "del lib"
47
47
  },
48
48
  "dependencies": {
49
- "@react-navigation/elements": "^3.0.0-alpha.53",
50
- "react-native-drawer-layout": "^5.0.0-alpha.19",
49
+ "@react-navigation/elements": "^3.0.0-alpha.55",
50
+ "react-native-drawer-layout": "^5.0.0-alpha.20",
51
51
  "use-latest-callback": "^0.3.5"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@jest/globals": "^30.4.1",
55
- "@react-navigation/native": "^8.0.0-alpha.49",
55
+ "@react-navigation/native": "^8.0.0-alpha.51",
56
56
  "@testing-library/react-native": "^14.0.0",
57
57
  "@types/react": "~19.2.17",
58
58
  "del-cli": "^7.0.0",
@@ -62,19 +62,19 @@
62
62
  "react-native-gesture-handler": "^3.0.2",
63
63
  "react-native-reanimated": "4.5.3",
64
64
  "react-native-safe-area-context": "~5.10.0",
65
- "react-native-screens": "^4.26.2",
65
+ "react-native-screens": "^4.30.0",
66
66
  "react-native-worklets": "0.11.3",
67
67
  "test-renderer": "1.2.0",
68
68
  "typescript": "^6.0.3"
69
69
  },
70
70
  "peerDependencies": {
71
- "@react-navigation/native": "^8.0.0-alpha.49",
71
+ "@react-navigation/native": "^8.0.0-alpha.51",
72
72
  "react": ">= 19.2.0",
73
73
  "react-native": "*",
74
74
  "react-native-gesture-handler": ">= 3.0.0",
75
75
  "react-native-reanimated": ">= 4.0.0",
76
76
  "react-native-safe-area-context": ">= 5.5.0",
77
- "react-native-screens": ">= 4.25.0",
77
+ "react-native-screens": ">= 4.30.0",
78
78
  "react-native-worklets": ">= 0.4.0"
79
79
  },
80
80
  "react-native-builder-bob": {
@@ -95,5 +95,5 @@
95
95
  ]
96
96
  ]
97
97
  },
98
- "gitHead": "110f8e897f476977b7227e5f0326996106a742f0"
98
+ "gitHead": "7db23d23b7808c2cc6e8fae82982f0b60d5a0003"
99
99
  }
package/src/types.tsx CHANGED
@@ -133,7 +133,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
133
133
 
134
134
  /**
135
135
  * Type of the drawer. It determines how the drawer looks and animates.
136
- * - `front`: Traditional drawer which covers the screen with a overlay behind it.
136
+ * - `front`: Traditional drawer which covers the screen with an overlay behind it.
137
137
  * - `back`: The drawer is revealed behind the screen on swipe.
138
138
  * - `slide`: Both the screen and the drawer slide on swipe to reveal the drawer.
139
139
  * - `permanent`: A permanent drawer is shown as a sidebar.
@@ -195,7 +195,7 @@ export type DrawerNavigationOptions = HeaderOptions & {
195
195
  swipeMinDistance?: number | undefined;
196
196
 
197
197
  /**
198
- * Whether the keyboard should be dismissed when the swipe gesture begins.
198
+ * Whether the keyboard should be dismissed when the drawer starts opening or closing.
199
199
  * Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.
200
200
  */
201
201
  keyboardDismissMode?: 'on-drag' | 'none' | undefined;
@@ -3,7 +3,11 @@ import {
3
3
  type Icon,
4
4
  PlatformIcon,
5
5
  } from '@react-navigation/elements';
6
- import { DrawerActions, useNavigation } from '@react-navigation/native';
6
+ import {
7
+ DrawerActions,
8
+ MaterialSymbol,
9
+ useNavigation,
10
+ } from '@react-navigation/native';
7
11
  import * as React from 'react';
8
12
  import { type ColorValue, Platform, StyleSheet } from 'react-native';
9
13
 
@@ -36,10 +40,15 @@ export function DrawerToggleButton({
36
40
  type: 'sfSymbol',
37
41
  name: 'line.3.horizontal',
38
42
  },
39
- android: {
40
- type: 'materialSymbol',
41
- name: 'menu',
42
- },
43
+ android: MaterialSymbol.isAvailable()
44
+ ? {
45
+ type: 'materialSymbol',
46
+ name: 'menu',
47
+ }
48
+ : {
49
+ type: 'image',
50
+ source: toggleDrawerIcon,
51
+ },
43
52
  default: {
44
53
  type: 'image',
45
54
  source: toggleDrawerIcon,
@@ -21,6 +21,7 @@ import useLatestCallback from 'use-latest-callback';
21
21
 
22
22
  import type {
23
23
  DrawerContentComponentProps,
24
+ DrawerDescriptor,
24
25
  DrawerDescriptorMap,
25
26
  DrawerHeaderProps,
26
27
  DrawerNavigationConfig,
@@ -43,6 +44,68 @@ type Props = DrawerNavigationConfig & {
43
44
 
44
45
  const DRAWER_BORDER_RADIUS = 16;
45
46
 
47
+ type DrawerSceneProps = {
48
+ descriptor: DrawerDescriptor;
49
+ isFocused: boolean;
50
+ mode: 'normal' | 'inert' | 'paused';
51
+ drawerPosition: 'left' | 'right';
52
+ };
53
+
54
+ const DrawerScene = React.memo(function DrawerScene({
55
+ descriptor,
56
+ isFocused,
57
+ mode,
58
+ drawerPosition,
59
+ }: DrawerSceneProps) {
60
+ const {
61
+ header = ({ route, options }: DrawerHeaderProps) => (
62
+ <Header
63
+ {...options}
64
+ title={getHeaderTitle(options, route.name)}
65
+ headerLeft={
66
+ drawerPosition === 'left' && options.headerLeft == null
67
+ ? (props) => <DrawerToggleButton {...props} />
68
+ : options.headerLeft
69
+ }
70
+ headerRight={
71
+ drawerPosition === 'right' && options.headerRight == null
72
+ ? (props) => <DrawerToggleButton {...props} />
73
+ : options.headerRight
74
+ }
75
+ />
76
+ ),
77
+ headerShown,
78
+ headerStatusBarHeight,
79
+ headerTransparent,
80
+ sceneStyle,
81
+ } = descriptor.options;
82
+
83
+ return (
84
+ <ActivityView
85
+ mode={mode}
86
+ visible={isFocused}
87
+ style={{ ...StyleSheet.absoluteFill, zIndex: isFocused ? 0 : -1 }}
88
+ >
89
+ <ScreenContent
90
+ focused={isFocused}
91
+ route={descriptor.route}
92
+ navigation={descriptor.navigation}
93
+ headerShown={headerShown}
94
+ headerStatusBarHeight={headerStatusBarHeight}
95
+ headerTransparent={headerTransparent}
96
+ header={header({
97
+ route: descriptor.route,
98
+ navigation: descriptor.navigation,
99
+ options: descriptor.options,
100
+ })}
101
+ style={sceneStyle}
102
+ >
103
+ {descriptor.render()}
104
+ </ScreenContent>
105
+ </ActivityView>
106
+ );
107
+ });
108
+
46
109
  const renderDrawerContentDefault = (props: DrawerContentComponentProps) => (
47
110
  <DrawerContent {...props} />
48
111
  );
@@ -246,29 +309,7 @@ function DrawerViewBase({
246
309
  return null;
247
310
  }
248
311
 
249
- const {
250
- inactiveBehavior = 'pause',
251
- header = ({ options }: DrawerHeaderProps) => (
252
- <Header
253
- {...options}
254
- title={getHeaderTitle(options, route.name)}
255
- headerLeft={
256
- drawerPosition === 'left' && options.headerLeft == null
257
- ? (props) => <DrawerToggleButton {...props} />
258
- : options.headerLeft
259
- }
260
- headerRight={
261
- drawerPosition === 'right' && options.headerRight == null
262
- ? (props) => <DrawerToggleButton {...props} />
263
- : options.headerRight
264
- }
265
- />
266
- ),
267
- headerShown,
268
- headerStatusBarHeight,
269
- headerTransparent,
270
- sceneStyle,
271
- } = descriptor.options;
312
+ const { inactiveBehavior = 'pause' } = descriptor.options;
272
313
 
273
314
  // For preloaded screens and if lazy is false,
274
315
  // Keep them active so that the effects can run
@@ -279,29 +320,13 @@ function DrawerViewBase({
279
320
  (lazy === false && !loaded.includes(route.key));
280
321
 
281
322
  return (
282
- <ActivityView
323
+ <DrawerScene
283
324
  key={route.key}
325
+ descriptor={descriptor}
326
+ isFocused={isFocused}
284
327
  mode={isFocused ? 'normal' : isActive ? 'inert' : 'paused'}
285
- visible={isFocused}
286
- style={{ ...StyleSheet.absoluteFill, zIndex: isFocused ? 0 : -1 }}
287
- >
288
- <ScreenContent
289
- focused={isFocused}
290
- route={descriptor.route}
291
- navigation={descriptor.navigation}
292
- headerShown={headerShown}
293
- headerStatusBarHeight={headerStatusBarHeight}
294
- headerTransparent={headerTransparent}
295
- header={header({
296
- route: descriptor.route,
297
- navigation: descriptor.navigation,
298
- options: descriptor.options,
299
- })}
300
- style={sceneStyle}
301
- >
302
- {descriptor.render()}
303
- </ScreenContent>
304
- </ActivityView>
328
+ drawerPosition={drawerPosition}
329
+ />
305
330
  );
306
331
  })}
307
332
  </Container>