@react-navigation/drawer 6.5.4 → 6.5.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.
Files changed (144) hide show
  1. package/lib/commonjs/index.js +0 -14
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/navigators/createDrawerNavigator.js +0 -15
  4. package/lib/commonjs/navigators/createDrawerNavigator.js.map +1 -1
  5. package/lib/commonjs/types.js.map +1 -1
  6. package/lib/commonjs/utils/DrawerGestureContext.js +0 -5
  7. package/lib/commonjs/utils/DrawerGestureContext.js.map +1 -1
  8. package/lib/commonjs/utils/DrawerPositionContext.js +0 -5
  9. package/lib/commonjs/utils/DrawerPositionContext.js.map +1 -1
  10. package/lib/commonjs/utils/DrawerProgressContext.js +0 -5
  11. package/lib/commonjs/utils/DrawerProgressContext.js.map +1 -1
  12. package/lib/commonjs/utils/DrawerStatusContext.js +0 -4
  13. package/lib/commonjs/utils/DrawerStatusContext.js.map +1 -1
  14. package/lib/commonjs/utils/getDrawerStatusFromState.js +1 -5
  15. package/lib/commonjs/utils/getDrawerStatusFromState.js.map +1 -1
  16. package/lib/commonjs/utils/useDrawerProgress.js +0 -8
  17. package/lib/commonjs/utils/useDrawerProgress.js.map +1 -1
  18. package/lib/commonjs/utils/useDrawerStatus.js +0 -8
  19. package/lib/commonjs/utils/useDrawerStatus.js.map +1 -1
  20. package/lib/commonjs/views/DrawerContent.js +0 -8
  21. package/lib/commonjs/views/DrawerContent.js.map +1 -1
  22. package/lib/commonjs/views/DrawerContentScrollView.js +0 -12
  23. package/lib/commonjs/views/DrawerContentScrollView.js.map +1 -1
  24. package/lib/commonjs/views/DrawerItem.js +8 -21
  25. package/lib/commonjs/views/DrawerItem.js.map +1 -1
  26. package/lib/commonjs/views/DrawerItemList.js +2 -11
  27. package/lib/commonjs/views/DrawerItemList.js.map +1 -1
  28. package/lib/commonjs/views/DrawerToggleButton.js +0 -9
  29. package/lib/commonjs/views/DrawerToggleButton.js.map +1 -1
  30. package/lib/commonjs/views/DrawerView.js +9 -52
  31. package/lib/commonjs/views/DrawerView.js.map +1 -1
  32. package/lib/commonjs/views/GestureHandler.android.js +0 -2
  33. package/lib/commonjs/views/GestureHandler.android.js.map +1 -1
  34. package/lib/commonjs/views/GestureHandler.ios.js +0 -2
  35. package/lib/commonjs/views/GestureHandler.ios.js.map +1 -1
  36. package/lib/commonjs/views/GestureHandler.js +0 -6
  37. package/lib/commonjs/views/GestureHandler.js.map +1 -1
  38. package/lib/commonjs/views/GestureHandlerNative.js +0 -7
  39. package/lib/commonjs/views/GestureHandlerNative.js.map +1 -1
  40. package/lib/commonjs/views/ScreenFallback.js +2 -18
  41. package/lib/commonjs/views/ScreenFallback.js.map +1 -1
  42. package/lib/commonjs/views/legacy/Drawer.js +62 -105
  43. package/lib/commonjs/views/legacy/Drawer.js.map +1 -1
  44. package/lib/commonjs/views/legacy/Overlay.js +3 -13
  45. package/lib/commonjs/views/legacy/Overlay.js.map +1 -1
  46. package/lib/commonjs/views/modern/Drawer.js +42 -45
  47. package/lib/commonjs/views/modern/Drawer.js.map +1 -1
  48. package/lib/commonjs/views/modern/Overlay.js +4 -12
  49. package/lib/commonjs/views/modern/Overlay.js.map +1 -1
  50. package/lib/module/index.js +3 -2
  51. package/lib/module/index.js.map +1 -1
  52. package/lib/module/navigators/createDrawerNavigator.js +0 -7
  53. package/lib/module/navigators/createDrawerNavigator.js.map +1 -1
  54. package/lib/module/types.js.map +1 -1
  55. package/lib/module/utils/DrawerGestureContext.js.map +1 -1
  56. package/lib/module/utils/DrawerPositionContext.js.map +1 -1
  57. package/lib/module/utils/DrawerProgressContext.js.map +1 -1
  58. package/lib/module/utils/DrawerStatusContext.js.map +1 -1
  59. package/lib/module/utils/getDrawerStatusFromState.js +1 -4
  60. package/lib/module/utils/getDrawerStatusFromState.js.map +1 -1
  61. package/lib/module/utils/useDrawerProgress.js +0 -2
  62. package/lib/module/utils/useDrawerProgress.js.map +1 -1
  63. package/lib/module/utils/useDrawerStatus.js +1 -3
  64. package/lib/module/utils/useDrawerStatus.js.map +1 -1
  65. package/lib/module/views/DrawerContent.js +0 -1
  66. package/lib/module/views/DrawerContent.js.map +1 -1
  67. package/lib/module/views/DrawerContentScrollView.js +0 -3
  68. package/lib/module/views/DrawerContentScrollView.js.map +1 -1
  69. package/lib/module/views/DrawerItem.js +8 -10
  70. package/lib/module/views/DrawerItem.js.map +1 -1
  71. package/lib/module/views/DrawerItemList.js +2 -5
  72. package/lib/module/views/DrawerItemList.js.map +1 -1
  73. package/lib/module/views/DrawerToggleButton.js +0 -1
  74. package/lib/module/views/DrawerToggleButton.js.map +1 -1
  75. package/lib/module/views/DrawerView.js +9 -35
  76. package/lib/module/views/DrawerView.js.map +1 -1
  77. package/lib/module/views/GestureHandler.android.js.map +1 -1
  78. package/lib/module/views/GestureHandler.ios.js.map +1 -1
  79. package/lib/module/views/GestureHandler.js +0 -2
  80. package/lib/module/views/GestureHandler.js.map +1 -1
  81. package/lib/module/views/GestureHandlerNative.js.map +1 -1
  82. package/lib/module/views/ScreenFallback.js +2 -10
  83. package/lib/module/views/ScreenFallback.js.map +1 -1
  84. package/lib/module/views/legacy/Drawer.js +62 -90
  85. package/lib/module/views/legacy/Drawer.js.map +1 -1
  86. package/lib/module/views/legacy/Overlay.js +3 -3
  87. package/lib/module/views/legacy/Overlay.js.map +1 -1
  88. package/lib/module/views/modern/Drawer.js +42 -31
  89. package/lib/module/views/modern/Drawer.js.map +1 -1
  90. package/lib/module/views/modern/Overlay.js +4 -3
  91. package/lib/module/views/modern/Overlay.js.map +1 -1
  92. package/lib/typescript/src/index.d.ts +1 -0
  93. package/lib/typescript/src/index.d.ts.map +1 -0
  94. package/lib/typescript/src/navigators/createDrawerNavigator.d.ts +1 -0
  95. package/lib/typescript/src/navigators/createDrawerNavigator.d.ts.map +1 -0
  96. package/lib/typescript/src/types.d.ts +1 -0
  97. package/lib/typescript/src/types.d.ts.map +1 -0
  98. package/lib/typescript/src/utils/DrawerGestureContext.d.ts +1 -0
  99. package/lib/typescript/src/utils/DrawerGestureContext.d.ts.map +1 -0
  100. package/lib/typescript/src/utils/DrawerPositionContext.d.ts +1 -0
  101. package/lib/typescript/src/utils/DrawerPositionContext.d.ts.map +1 -0
  102. package/lib/typescript/src/utils/DrawerProgressContext.d.ts +1 -0
  103. package/lib/typescript/src/utils/DrawerProgressContext.d.ts.map +1 -0
  104. package/lib/typescript/src/utils/DrawerStatusContext.d.ts +1 -0
  105. package/lib/typescript/src/utils/DrawerStatusContext.d.ts.map +1 -0
  106. package/lib/typescript/src/utils/getDrawerStatusFromState.d.ts +1 -0
  107. package/lib/typescript/src/utils/getDrawerStatusFromState.d.ts.map +1 -0
  108. package/lib/typescript/src/utils/useDrawerProgress.d.ts +1 -0
  109. package/lib/typescript/src/utils/useDrawerProgress.d.ts.map +1 -0
  110. package/lib/typescript/src/utils/useDrawerStatus.d.ts +1 -0
  111. package/lib/typescript/src/utils/useDrawerStatus.d.ts.map +1 -0
  112. package/lib/typescript/src/views/DrawerContent.d.ts +1 -0
  113. package/lib/typescript/src/views/DrawerContent.d.ts.map +1 -0
  114. package/lib/typescript/src/views/DrawerContentScrollView.d.ts +1 -0
  115. package/lib/typescript/src/views/DrawerContentScrollView.d.ts.map +1 -0
  116. package/lib/typescript/src/views/DrawerItem.d.ts +1 -0
  117. package/lib/typescript/src/views/DrawerItem.d.ts.map +1 -0
  118. package/lib/typescript/src/views/DrawerItemList.d.ts +1 -0
  119. package/lib/typescript/src/views/DrawerItemList.d.ts.map +1 -0
  120. package/lib/typescript/src/views/DrawerToggleButton.d.ts +1 -0
  121. package/lib/typescript/src/views/DrawerToggleButton.d.ts.map +1 -0
  122. package/lib/typescript/src/views/DrawerView.d.ts +1 -0
  123. package/lib/typescript/src/views/DrawerView.d.ts.map +1 -0
  124. package/lib/typescript/src/views/GestureHandler.android.d.ts +1 -0
  125. package/lib/typescript/src/views/GestureHandler.android.d.ts.map +1 -0
  126. package/lib/typescript/src/views/GestureHandler.d.ts +1 -0
  127. package/lib/typescript/src/views/GestureHandler.d.ts.map +1 -0
  128. package/lib/typescript/src/views/GestureHandler.ios.d.ts +1 -0
  129. package/lib/typescript/src/views/GestureHandler.ios.d.ts.map +1 -0
  130. package/lib/typescript/src/views/GestureHandlerNative.d.ts +1 -0
  131. package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +1 -0
  132. package/lib/typescript/src/views/ScreenFallback.d.ts +1 -0
  133. package/lib/typescript/src/views/ScreenFallback.d.ts.map +1 -0
  134. package/lib/typescript/src/views/legacy/Drawer.d.ts +1 -0
  135. package/lib/typescript/src/views/legacy/Drawer.d.ts.map +1 -0
  136. package/lib/typescript/src/views/legacy/Overlay.d.ts +1 -0
  137. package/lib/typescript/src/views/legacy/Overlay.d.ts.map +1 -0
  138. package/lib/typescript/src/views/modern/Drawer.d.ts +1 -0
  139. package/lib/typescript/src/views/modern/Drawer.d.ts.map +1 -0
  140. package/lib/typescript/src/views/modern/Overlay.d.ts +1 -0
  141. package/lib/typescript/src/views/modern/Overlay.d.ts.map +1 -0
  142. package/package.json +5 -5
  143. package/src/views/modern/Drawer.tsx +23 -4
  144. package/src/views/modern/Overlay.tsx +1 -0
@@ -81,32 +81,18 @@ Object.defineProperty(exports, "useDrawerStatus", {
81
81
  return _useDrawerStatus.default;
82
82
  }
83
83
  });
84
-
85
84
  var _createDrawerNavigator = _interopRequireDefault(require("./navigators/createDrawerNavigator"));
86
-
87
85
  var _DrawerContent = _interopRequireDefault(require("./views/DrawerContent"));
88
-
89
86
  var _DrawerContentScrollView = _interopRequireDefault(require("./views/DrawerContentScrollView"));
90
-
91
87
  var _DrawerItem = _interopRequireDefault(require("./views/DrawerItem"));
92
-
93
88
  var _DrawerItemList = _interopRequireDefault(require("./views/DrawerItemList"));
94
-
95
89
  var _DrawerToggleButton = _interopRequireDefault(require("./views/DrawerToggleButton"));
96
-
97
90
  var _DrawerView = _interopRequireDefault(require("./views/DrawerView"));
98
-
99
91
  var _DrawerGestureContext = _interopRequireDefault(require("./utils/DrawerGestureContext"));
100
-
101
92
  var _DrawerProgressContext = _interopRequireDefault(require("./utils/DrawerProgressContext"));
102
-
103
93
  var _DrawerStatusContext = _interopRequireDefault(require("./utils/DrawerStatusContext"));
104
-
105
94
  var _getDrawerStatusFromState = _interopRequireDefault(require("./utils/getDrawerStatusFromState"));
106
-
107
95
  var _useDrawerProgress = _interopRequireDefault(require("./utils/useDrawerProgress"));
108
-
109
96
  var _useDrawerStatus = _interopRequireDefault(require("./utils/useDrawerStatus"));
110
-
111
97
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
112
98
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["/**\n * Navigators\n */\nexport { default as createDrawerNavigator } from './navigators/createDrawerNavigator';\n\n/**\n * Views\n */\nexport { default as DrawerContent } from './views/DrawerContent';\nexport { default as DrawerContentScrollView } from './views/DrawerContentScrollView';\nexport { default as DrawerItem } from './views/DrawerItem';\nexport { default as DrawerItemList } from './views/DrawerItemList';\nexport { default as DrawerToggleButton } from './views/DrawerToggleButton';\nexport { default as DrawerView } from './views/DrawerView';\n\n/**\n * Utilities\n */\nexport { default as DrawerGestureContext } from './utils/DrawerGestureContext';\nexport { default as DrawerProgressContext } from './utils/DrawerProgressContext';\nexport { default as DrawerStatusContext } from './utils/DrawerStatusContext';\nexport { default as getDrawerStatusFromState } from './utils/getDrawerStatusFromState';\nexport { default as useDrawerProgress } from './utils/useDrawerProgress';\nexport { default as useDrawerStatus } from './utils/useDrawerStatus';\n\n/**\n * Types\n */\nexport type {\n DrawerContentComponentProps,\n DrawerHeaderProps,\n DrawerNavigationEventMap,\n DrawerNavigationOptions,\n DrawerNavigationProp,\n DrawerScreenProps,\n} from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA"}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;AAKA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AAAqE"}
@@ -4,23 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _native = require("@react-navigation/native");
9
-
10
8
  var React = _interopRequireWildcard(require("react"));
11
-
12
9
  var _warnOnce = _interopRequireDefault(require("warn-once"));
13
-
14
10
  var _DrawerView = _interopRequireDefault(require("../views/DrawerView"));
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
14
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
-
24
15
  function DrawerNavigator(_ref) {
25
16
  let {
26
17
  id,
@@ -42,7 +33,6 @@ function DrawerNavigator(_ref) {
42
33
  ...rest
43
34
  } = restWithDeprecated;
44
35
  let defaultScreenOptions = {};
45
-
46
36
  if (drawerContentOptions) {
47
37
  Object.assign(defaultScreenOptions, {
48
38
  drawerPosition: drawerContentOptions.drawerPosition,
@@ -63,16 +53,13 @@ function DrawerNavigator(_ref) {
63
53
  });
64
54
  (0, _warnOnce.default)(drawerContentOptions, `Drawer Navigator: 'drawerContentOptions' is deprecated. Migrate the options to 'screenOptions' instead.\n\nPlace the following in 'screenOptions' in your code to keep current behavior:\n\n${JSON.stringify(defaultScreenOptions, null, 2)}\n\nSee https://reactnavigation.org/docs/drawer-navigator#options for more details.`);
65
55
  }
66
-
67
56
  if (typeof lazy === 'boolean') {
68
57
  defaultScreenOptions.lazy = lazy;
69
58
  (0, _warnOnce.default)(true, `Drawer Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\n\nSee https://reactnavigation.org/docs/drawer-navigator/#lazy for more details.`);
70
59
  }
71
-
72
60
  if (typeof openByDefault === 'boolean') {
73
61
  (0, _warnOnce.default)(true, `Drawer Navigator: 'openByDefault' is deprecated. Use 'defaultStatus' and set it to 'open' or 'closed' instead.\n\nSee https://reactnavigation.org/docs/drawer-navigator/#defaultstatus for more details.`);
74
62
  }
75
-
76
63
  const defaultStatus = customDefaultStatus !== undefined ? customDefaultStatus : openByDefault ? 'open' : 'closed';
77
64
  const {
78
65
  state,
@@ -96,8 +83,6 @@ function DrawerNavigator(_ref) {
96
83
  navigation: navigation
97
84
  })));
98
85
  }
99
-
100
86
  var _default = (0, _native.createNavigatorFactory)(DrawerNavigator);
101
-
102
87
  exports.default = _default;
103
88
  //# sourceMappingURL=createDrawerNavigator.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DrawerNavigator","id","initialRouteName","defaultStatus","customDefaultStatus","backBehavior","children","screenListeners","screenOptions","restWithDeprecated","openByDefault","lazy","drawerContentOptions","rest","defaultScreenOptions","Object","assign","drawerPosition","drawerType","swipeEdgeWidth","edgeWidth","drawerHideStatusBarOnOpen","hideStatusBar","keyboardDismissMode","swipeMinDistance","minSwipeDistance","overlayColor","drawerStatusBarAnimation","statusBarAnimation","gestureHandlerProps","keys","forEach","key","undefined","warnOnce","JSON","stringify","state","descriptors","navigation","NavigationContent","useNavigationBuilder","DrawerRouter","createNavigatorFactory"],"sources":["createDrawerNavigator.tsx"],"sourcesContent":["import {\n createNavigatorFactory,\n DefaultNavigatorOptions,\n DrawerActionHelpers,\n DrawerNavigationState,\n DrawerRouter,\n DrawerRouterOptions,\n DrawerStatus,\n ParamListBase,\n useNavigationBuilder,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport warnOnce from 'warn-once';\n\nimport type {\n DrawerNavigationConfig,\n DrawerNavigationEventMap,\n DrawerNavigationOptions,\n} from '../types';\nimport DrawerView from '../views/DrawerView';\n\ntype Props = DefaultNavigatorOptions<\n ParamListBase,\n DrawerNavigationState<ParamListBase>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap\n> &\n DrawerRouterOptions &\n DrawerNavigationConfig;\n\nfunction DrawerNavigator({\n id,\n initialRouteName,\n defaultStatus: customDefaultStatus,\n backBehavior,\n children,\n screenListeners,\n screenOptions,\n ...restWithDeprecated\n}: Props) {\n const {\n // @ts-expect-error: openByDefault is deprecated\n openByDefault,\n // @ts-expect-error: lazy is deprecated\n lazy,\n // @ts-expect-error: drawerContentOptions is deprecated\n drawerContentOptions,\n ...rest\n } = restWithDeprecated;\n\n let defaultScreenOptions: DrawerNavigationOptions = {};\n\n if (drawerContentOptions) {\n Object.assign(defaultScreenOptions, {\n drawerPosition: drawerContentOptions.drawerPosition,\n drawerType: drawerContentOptions.drawerType,\n swipeEdgeWidth: drawerContentOptions.edgeWidth,\n drawerHideStatusBarOnOpen: drawerContentOptions.hideStatusBar,\n keyboardDismissMode: drawerContentOptions.keyboardDismissMode,\n swipeMinDistance: drawerContentOptions.minSwipeDistance,\n overlayColor: drawerContentOptions.overlayColor,\n drawerStatusBarAnimation: drawerContentOptions.statusBarAnimation,\n gestureHandlerProps: drawerContentOptions.gestureHandlerProps,\n });\n\n (\n Object.keys(defaultScreenOptions) as (keyof DrawerNavigationOptions)[]\n ).forEach((key) => {\n if (defaultScreenOptions[key] === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete defaultScreenOptions[key];\n }\n });\n\n warnOnce(\n drawerContentOptions,\n `Drawer Navigator: 'drawerContentOptions' is deprecated. Migrate the options to 'screenOptions' instead.\\n\\nPlace the following in 'screenOptions' in your code to keep current behavior:\\n\\n${JSON.stringify(\n defaultScreenOptions,\n null,\n 2\n )}\\n\\nSee https://reactnavigation.org/docs/drawer-navigator#options for more details.`\n );\n }\n\n if (typeof lazy === 'boolean') {\n defaultScreenOptions.lazy = lazy;\n\n warnOnce(\n true,\n `Drawer Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\\n\\nSee https://reactnavigation.org/docs/drawer-navigator/#lazy for more details.`\n );\n }\n\n if (typeof openByDefault === 'boolean') {\n warnOnce(\n true,\n `Drawer Navigator: 'openByDefault' is deprecated. Use 'defaultStatus' and set it to 'open' or 'closed' instead.\\n\\nSee https://reactnavigation.org/docs/drawer-navigator/#defaultstatus for more details.`\n );\n }\n\n const defaultStatus: DrawerStatus =\n customDefaultStatus !== undefined\n ? customDefaultStatus\n : openByDefault\n ? 'open'\n : 'closed';\n\n const { state, descriptors, navigation, NavigationContent } =\n useNavigationBuilder<\n DrawerNavigationState<ParamListBase>,\n DrawerRouterOptions,\n DrawerActionHelpers<ParamListBase>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap\n >(DrawerRouter, {\n id,\n initialRouteName,\n defaultStatus,\n backBehavior,\n children,\n screenListeners,\n screenOptions,\n defaultScreenOptions,\n });\n\n return (\n <NavigationContent>\n <DrawerView\n {...rest}\n defaultStatus={defaultStatus}\n state={state}\n descriptors={descriptors}\n navigation={navigation}\n />\n </NavigationContent>\n );\n}\n\nexport default createNavigatorFactory<\n DrawerNavigationState<ParamListBase>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap,\n typeof DrawerNavigator\n>(DrawerNavigator);\n"],"mappings":";;;;;;;AAAA;;AAWA;;AACA;;AAOA;;;;;;;;;;AAWA,SAASA,eAAT,OASU;EAAA,IATe;IACvBC,EADuB;IAEvBC,gBAFuB;IAGvBC,aAAa,EAAEC,mBAHQ;IAIvBC,YAJuB;IAKvBC,QALuB;IAMvBC,eANuB;IAOvBC,aAPuB;IAQvB,GAAGC;EARoB,CASf;EACR,MAAM;IACJ;IACAC,aAFI;IAGJ;IACAC,IAJI;IAKJ;IACAC,oBANI;IAOJ,GAAGC;EAPC,IAQFJ,kBARJ;EAUA,IAAIK,oBAA6C,GAAG,EAApD;;EAEA,IAAIF,oBAAJ,EAA0B;IACxBG,MAAM,CAACC,MAAP,CAAcF,oBAAd,EAAoC;MAClCG,cAAc,EAAEL,oBAAoB,CAACK,cADH;MAElCC,UAAU,EAAEN,oBAAoB,CAACM,UAFC;MAGlCC,cAAc,EAAEP,oBAAoB,CAACQ,SAHH;MAIlCC,yBAAyB,EAAET,oBAAoB,CAACU,aAJd;MAKlCC,mBAAmB,EAAEX,oBAAoB,CAACW,mBALR;MAMlCC,gBAAgB,EAAEZ,oBAAoB,CAACa,gBANL;MAOlCC,YAAY,EAAEd,oBAAoB,CAACc,YAPD;MAQlCC,wBAAwB,EAAEf,oBAAoB,CAACgB,kBARb;MASlCC,mBAAmB,EAAEjB,oBAAoB,CAACiB;IATR,CAApC;IAaEd,MAAM,CAACe,IAAP,CAAYhB,oBAAZ,CADF,CAEEiB,OAFF,CAEWC,GAAD,IAAS;MACjB,IAAIlB,oBAAoB,CAACkB,GAAD,CAApB,KAA8BC,SAAlC,EAA6C;QAC3C;QACA,OAAOnB,oBAAoB,CAACkB,GAAD,CAA3B;MACD;IACF,CAPD;IASA,IAAAE,iBAAA,EACEtB,oBADF,EAEG,+LAA8LuB,IAAI,CAACC,SAAL,CAC7LtB,oBAD6L,EAE7L,IAF6L,EAG7L,CAH6L,CAI7L,qFANJ;EAQD;;EAED,IAAI,OAAOH,IAAP,KAAgB,SAApB,EAA+B;IAC7BG,oBAAoB,CAACH,IAArB,GAA4BA,IAA5B;IAEA,IAAAuB,iBAAA,EACE,IADF,EAEG,uKAFH;EAID;;EAED,IAAI,OAAOxB,aAAP,KAAyB,SAA7B,EAAwC;IACtC,IAAAwB,iBAAA,EACE,IADF,EAEG,0MAFH;EAID;;EAED,MAAM/B,aAA2B,GAC/BC,mBAAmB,KAAK6B,SAAxB,GACI7B,mBADJ,GAEIM,aAAa,GACb,MADa,GAEb,QALN;EAOA,MAAM;IAAE2B,KAAF;IAASC,WAAT;IAAsBC,UAAtB;IAAkCC;EAAlC,IACJ,IAAAC,4BAAA,EAMEC,oBANF,EAMgB;IACdzC,EADc;IAEdC,gBAFc;IAGdC,aAHc;IAIdE,YAJc;IAKdC,QALc;IAMdC,eANc;IAOdC,aAPc;IAQdM;EARc,CANhB,CADF;EAkBA,oBACE,oBAAC,iBAAD,qBACE,oBAAC,mBAAD,eACMD,IADN;IAEE,aAAa,EAAEV,aAFjB;IAGE,KAAK,EAAEkC,KAHT;IAIE,WAAW,EAAEC,WAJf;IAKE,UAAU,EAAEC;EALd,GADF,CADF;AAWD;;eAEc,IAAAI,8BAAA,EAKb3C,eALa,C"}
1
+ {"version":3,"names":["DrawerNavigator","id","initialRouteName","defaultStatus","customDefaultStatus","backBehavior","children","screenListeners","screenOptions","restWithDeprecated","openByDefault","lazy","drawerContentOptions","rest","defaultScreenOptions","Object","assign","drawerPosition","drawerType","swipeEdgeWidth","edgeWidth","drawerHideStatusBarOnOpen","hideStatusBar","keyboardDismissMode","swipeMinDistance","minSwipeDistance","overlayColor","drawerStatusBarAnimation","statusBarAnimation","gestureHandlerProps","keys","forEach","key","undefined","warnOnce","JSON","stringify","state","descriptors","navigation","NavigationContent","useNavigationBuilder","DrawerRouter","createNavigatorFactory"],"sourceRoot":"../../src","sources":["createDrawerNavigator.tsx"],"mappings":";;;;;;AAAA;AAWA;AACA;AAOA;AAA6C;AAAA;AAAA;AAAA;AAW7C,SAASA,eAAe,OASd;EAAA,IATe;IACvBC,EAAE;IACFC,gBAAgB;IAChBC,aAAa,EAAEC,mBAAmB;IAClCC,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACb,GAAGC;EACE,CAAC;EACN,MAAM;IACJ;IACAC,aAAa;IACb;IACAC,IAAI;IACJ;IACAC,oBAAoB;IACpB,GAAGC;EACL,CAAC,GAAGJ,kBAAkB;EAEtB,IAAIK,oBAA6C,GAAG,CAAC,CAAC;EAEtD,IAAIF,oBAAoB,EAAE;IACxBG,MAAM,CAACC,MAAM,CAACF,oBAAoB,EAAE;MAClCG,cAAc,EAAEL,oBAAoB,CAACK,cAAc;MACnDC,UAAU,EAAEN,oBAAoB,CAACM,UAAU;MAC3CC,cAAc,EAAEP,oBAAoB,CAACQ,SAAS;MAC9CC,yBAAyB,EAAET,oBAAoB,CAACU,aAAa;MAC7DC,mBAAmB,EAAEX,oBAAoB,CAACW,mBAAmB;MAC7DC,gBAAgB,EAAEZ,oBAAoB,CAACa,gBAAgB;MACvDC,YAAY,EAAEd,oBAAoB,CAACc,YAAY;MAC/CC,wBAAwB,EAAEf,oBAAoB,CAACgB,kBAAkB;MACjEC,mBAAmB,EAAEjB,oBAAoB,CAACiB;IAC5C,CAAC,CAAC;IAGAd,MAAM,CAACe,IAAI,CAAChB,oBAAoB,CAAC,CACjCiB,OAAO,CAAEC,GAAG,IAAK;MACjB,IAAIlB,oBAAoB,CAACkB,GAAG,CAAC,KAAKC,SAAS,EAAE;QAC3C;QACA,OAAOnB,oBAAoB,CAACkB,GAAG,CAAC;MAClC;IACF,CAAC,CAAC;IAEF,IAAAE,iBAAQ,EACNtB,oBAAoB,EACnB,+LAA8LuB,IAAI,CAACC,SAAS,CAC3MtB,oBAAoB,EACpB,IAAI,EACJ,CAAC,CACD,qFAAoF,CACvF;EACH;EAEA,IAAI,OAAOH,IAAI,KAAK,SAAS,EAAE;IAC7BG,oBAAoB,CAACH,IAAI,GAAGA,IAAI;IAEhC,IAAAuB,iBAAQ,EACN,IAAI,EACH,uKAAsK,CACxK;EACH;EAEA,IAAI,OAAOxB,aAAa,KAAK,SAAS,EAAE;IACtC,IAAAwB,iBAAQ,EACN,IAAI,EACH,0MAAyM,CAC3M;EACH;EAEA,MAAM/B,aAA2B,GAC/BC,mBAAmB,KAAK6B,SAAS,GAC7B7B,mBAAmB,GACnBM,aAAa,GACb,MAAM,GACN,QAAQ;EAEd,MAAM;IAAE2B,KAAK;IAAEC,WAAW;IAAEC,UAAU;IAAEC;EAAkB,CAAC,GACzD,IAAAC,4BAAoB,EAMlBC,oBAAY,EAAE;IACdzC,EAAE;IACFC,gBAAgB;IAChBC,aAAa;IACbE,YAAY;IACZC,QAAQ;IACRC,eAAe;IACfC,aAAa;IACbM;EACF,CAAC,CAAC;EAEJ,oBACE,oBAAC,iBAAiB,qBAChB,oBAAC,mBAAU,eACLD,IAAI;IACR,aAAa,EAAEV,aAAc;IAC7B,KAAK,EAAEkC,KAAM;IACb,WAAW,EAAEC,WAAY;IACzB,UAAU,EAAEC;EAAW,GACvB,CACgB;AAExB;AAAC,eAEc,IAAAI,8BAAsB,EAKnC3C,eAAe,CAAC;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import type { HeaderOptions } from '@react-navigation/elements';\nimport type {\n Descriptor,\n DrawerActionHelpers,\n DrawerNavigationState,\n NavigationHelpers,\n NavigationProp,\n ParamListBase,\n Route,\n RouteProp,\n} from '@react-navigation/native';\nimport type { StyleProp, TextStyle, ViewStyle } from 'react-native';\nimport type {\n PanGestureHandler,\n PanGestureHandlerProperties,\n} from 'react-native-gesture-handler';\n\nexport type Scene = {\n route: Route<string>;\n focused: boolean;\n color?: string;\n};\n\nexport type Layout = { width: number; height: number };\n\nexport type DrawerNavigationConfig = {\n /**\n * Function that returns React element to render as the content of the drawer, for example, navigation items.\n * Defaults to `DrawerContent`.\n */\n drawerContent?: (props: DrawerContentComponentProps) => React.ReactNode;\n /**\n * Whether inactive screens should be detached from the view hierarchy to save memory.\n * Make sure to call `enableScreens` from `react-native-screens` to make it work.\n * Defaults to `true`.\n */\n detachInactiveScreens?: boolean;\n /**\n * Whether to use the legacy implementation based on Reanimated 1.\n * The new implementation based on Reanimated 2 will perform better,\n * but you need additional configuration and need to use Hermes with Flipper to debug.\n *\n * This defaults to `true` if Reanimated 2 is not configured.\n *\n * Otherwise, it defaults to `false`\n */\n useLegacyImplementation?: boolean;\n};\n\nexport type DrawerNavigationOptions = HeaderOptions & {\n /**\n * Title text for the screen.\n */\n title?: string;\n\n /**\n * Whether this screens should render the first time it's accessed. Defaults to `true`.\n * Set it to `false` if you want to render the screen on initial render.\n */\n lazy?: boolean;\n\n /**\n * Function that returns a React Element to display as a header.\n */\n header?: (props: DrawerHeaderProps) => React.ReactNode;\n\n /**\n * Whether to show the header. Setting this to `false` hides the header.\n * Defaults to `true`.\n */\n headerShown?: boolean;\n\n /**\n * Title string of a screen displayed in the drawer\n * or a function that given { focused: boolean, color: string } returns a React.Node\n * When undefined, scene title is used.\n */\n drawerLabel?:\n | string\n | ((props: { color: string; focused: boolean }) => React.ReactNode);\n\n /**\n * A function that given { focused: boolean, color: string } returns a React.Node to display an icon the drawer.\n */\n drawerIcon?: (props: {\n color: string;\n size: number;\n focused: boolean;\n }) => React.ReactNode;\n\n /**\n * Color for the icon and label in the active item in the drawer.\n */\n drawerActiveTintColor?: string;\n\n /**\n * Background color for the active item in the drawer.\n */\n drawerActiveBackgroundColor?: string;\n\n /**\n * Color for the icon and label in the inactive items in the drawer.\n */\n drawerInactiveTintColor?: string;\n\n /**\n * Background color for the inactive items in the drawer.\n */\n drawerInactiveBackgroundColor?: string;\n\n /**\n * Whether label font should scale to respect Text Size accessibility settings.\n */\n drawerAllowFontScaling?: boolean;\n\n /**\n * Style object for the single item, which can contain an icon and/or a label.\n */\n drawerItemStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style object to apply to the `Text` inside content section which renders a label.\n */\n drawerLabelStyle?: StyleProp<TextStyle>;\n\n /**\n * Style object for the content section.\n */\n drawerContentContainerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style object for the wrapper view.\n */\n drawerContentStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style object for the drawer component.\n * You can pass a custom background color for a drawer or a custom width here.\n */\n drawerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Position of the drawer on the screen. Defaults to `left`.\n */\n drawerPosition?: 'left' | 'right';\n\n /**\n * Type of the drawer. It determines how the drawer looks and animates.\n * - `front`: Traditional drawer which covers the screen with a overlay behind it.\n * - `back`: The drawer is revealed behind the screen on swipe.\n * - `slide`: Both the screen and the drawer slide on swipe to reveal the drawer.\n * - `permanent`: A permanent drawer is shown as a sidebar.\n *\n * Defaults to `slide` on iOS and `front` on other platforms.\n */\n drawerType?: 'front' | 'back' | 'slide' | 'permanent';\n\n /**\n * Whether the statusbar should be hidden when the drawer is pulled or opens,\n */\n drawerHideStatusBarOnOpen?: boolean;\n\n /**\n * Animation of the statusbar when hiding it. use in combination with `drawerHideStatusBarOnOpen`.\n */\n drawerStatusBarAnimation?: 'slide' | 'none' | 'fade';\n\n /**\n * Color of the overlay to be displayed on top of the content view when drawer gets open.\n * The opacity is animated from `0` to `1` when the drawer opens.\n */\n overlayColor?: string;\n\n /**\n * Style object for the component wrapping the screen content.\n */\n sceneContainerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Props to pass to the underlying pan gesture handler.\n * Not supported on Web.\n */\n gestureHandlerProps?: PanGestureHandlerProperties;\n\n /**\n * Whether you can use swipe gestures to open or close the drawer.\n * Defaults to `true`.\n * Not supported on Web.\n */\n swipeEnabled?: boolean;\n\n /**\n * How far from the edge of the screen the swipe gesture should activate.\n * Not supported on Web.\n */\n swipeEdgeWidth?: number;\n\n /**\n * Minimum swipe distance threshold that should activate opening the drawer.\n */\n swipeMinDistance?: number;\n\n /**\n * Whether the keyboard should be dismissed when the swipe gesture begins.\n * Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.\n */\n keyboardDismissMode?: 'on-drag' | 'none';\n\n /**\n * Whether this screen should be unmounted when navigating away from it.\n * Defaults to `false`.\n */\n unmountOnBlur?: boolean;\n\n /**\n * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.\n * Defaults to `true` when `enableFreeze()` is run at the top of the application.\n * Requires `react-native-screens` version >=3.16.0.\n *\n * Only supported on iOS and Android.\n */\n freezeOnBlur?: boolean;\n};\n\nexport type DrawerContentComponentProps = {\n state: DrawerNavigationState<ParamListBase>;\n navigation: DrawerNavigationHelpers;\n descriptors: DrawerDescriptorMap;\n};\n\nexport type DrawerHeaderProps = {\n /**\n * Layout of the screen.\n */\n layout: Layout;\n /**\n * Options for the current screen.\n */\n options: DrawerNavigationOptions;\n /**\n * Route object for the current screen.\n */\n route: RouteProp<ParamListBase>;\n /**\n * Navigation prop for the header.\n */\n navigation: DrawerNavigationProp<ParamListBase>;\n};\n\nexport type DrawerNavigationEventMap = {\n /**\n * Event which fires on tapping on the item in the drawer menu.\n */\n drawerItemPress: { data: undefined; canPreventDefault: true };\n};\n\nexport type DrawerNavigationHelpers = NavigationHelpers<\n ParamListBase,\n DrawerNavigationEventMap\n> &\n DrawerActionHelpers<ParamListBase>;\n\nexport type DrawerNavigationProp<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = keyof ParamList,\n NavigatorID extends string | undefined = undefined\n> = NavigationProp<\n ParamList,\n RouteName,\n NavigatorID,\n DrawerNavigationState<ParamList>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap\n> &\n DrawerActionHelpers<ParamList>;\n\nexport type DrawerScreenProps<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = keyof ParamList,\n NavigatorID extends string | undefined = undefined\n> = {\n navigation: DrawerNavigationProp<ParamList, RouteName, NavigatorID>;\n route: RouteProp<ParamList, RouteName>;\n};\n\nexport type DrawerDescriptor = Descriptor<\n DrawerNavigationOptions,\n DrawerNavigationProp<ParamListBase>,\n RouteProp<ParamListBase>\n>;\n\nexport type DrawerDescriptorMap = Record<string, DrawerDescriptor>;\n\nexport type DrawerProps = {\n dimensions: { width: number; height: number };\n drawerPosition: 'left' | 'right';\n drawerStyle?: StyleProp<ViewStyle>;\n drawerType: 'front' | 'back' | 'slide' | 'permanent';\n gestureHandlerProps?: React.ComponentProps<typeof PanGestureHandler>;\n hideStatusBarOnOpen: boolean;\n keyboardDismissMode: 'none' | 'on-drag';\n onClose: () => void;\n onOpen: () => void;\n open: boolean;\n overlayStyle?: StyleProp<ViewStyle>;\n renderDrawerContent: () => React.ReactNode;\n renderSceneContent: () => React.ReactNode;\n statusBarAnimation: 'slide' | 'none' | 'fade';\n swipeDistanceThreshold: number;\n swipeEdgeWidth: number;\n swipeEnabled: boolean;\n swipeVelocityThreshold: number;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.tsx"],"mappings":""}
@@ -4,14 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
-
12
9
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
-
14
10
  var _default = /*#__PURE__*/React.createContext(null);
15
-
16
11
  exports.default = _default;
17
12
  //# sourceMappingURL=DrawerGestureContext.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext"],"sources":["DrawerGestureContext.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<React.RefObject<any> | null>(null);\n"],"mappings":";;;;;;;AAAA;;;;;;4BAEeA,KAAK,CAACC,aAAN,CAAiD,IAAjD,C"}
1
+ {"version":3,"names":["React","createContext"],"sourceRoot":"../../src","sources":["DrawerGestureContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAEhBA,KAAK,CAACC,aAAa,CAA8B,IAAI,CAAC;AAAA"}
@@ -4,14 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
-
12
9
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
-
14
10
  var _default = /*#__PURE__*/React.createContext(undefined);
15
-
16
11
  exports.default = _default;
17
12
  //# sourceMappingURL=DrawerPositionContext.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","undefined"],"sources":["DrawerPositionContext.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<'left' | 'right' | undefined>(undefined);\n"],"mappings":";;;;;;;AAAA;;;;;;4BAEeA,KAAK,CAACC,aAAN,CAAkDC,SAAlD,C"}
1
+ {"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["DrawerPositionContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAEhBA,KAAK,CAACC,aAAa,CAA+BC,SAAS,CAAC;AAAA"}
@@ -4,14 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
-
12
9
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
-
14
10
  var _default = /*#__PURE__*/React.createContext(undefined);
15
-
16
11
  exports.default = _default;
17
12
  //# sourceMappingURL=DrawerProgressContext.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","undefined"],"sources":["DrawerProgressContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport type Animated from 'react-native-reanimated';\n\nexport default React.createContext<\n Readonly<Animated.SharedValue<number>> | Animated.Node<number> | undefined\n>(undefined);\n"],"mappings":";;;;;;;AAAA;;;;;;4BAGeA,KAAK,CAACC,aAAN,CAEbC,SAFa,C"}
1
+ {"version":3,"names":["React","createContext","undefined"],"sourceRoot":"../../src","sources":["DrawerProgressContext.tsx"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAGhBA,KAAK,CAACC,aAAa,CAEhCC,SAAS,CAAC;AAAA"}
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
-
12
9
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
-
14
10
  const DrawerStatusContext = /*#__PURE__*/React.createContext(undefined);
15
11
  var _default = DrawerStatusContext;
16
12
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"names":["DrawerStatusContext","React","createContext","undefined"],"sources":["DrawerStatusContext.tsx"],"sourcesContent":["import type { DrawerStatus } from '@react-navigation/native';\nimport * as React from 'react';\n\nconst DrawerStatusContext = React.createContext<DrawerStatus | undefined>(\n undefined\n);\n\nexport default DrawerStatusContext;\n"],"mappings":";;;;;;;AACA;;;;;;AAEA,MAAMA,mBAAmB,gBAAGC,KAAK,CAACC,aAAN,CAC1BC,SAD0B,CAA5B;eAIeH,mB"}
1
+ {"version":3,"names":["DrawerStatusContext","React","createContext","undefined"],"sourceRoot":"../../src","sources":["DrawerStatusContext.tsx"],"mappings":";;;;;;AACA;AAA+B;AAAA;AAE/B,MAAMA,mBAAmB,gBAAGC,KAAK,CAACC,aAAa,CAC7CC,SAAS,CACV;AAAC,eAEaH,mBAAmB;AAAA"}
@@ -4,15 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = getDrawerStatusFromState;
7
-
8
7
  function getDrawerStatusFromState(state) {
9
- var _ref, _entry$status;
10
-
11
8
  if (state.history == null) {
12
9
  throw new Error("Couldn't find the drawer status in the state object. Is it a valid state object of drawer navigator?");
13
10
  }
14
-
15
11
  const entry = state.history.find(it => it.type === 'drawer');
16
- return (_ref = (_entry$status = entry === null || entry === void 0 ? void 0 : entry.status) !== null && _entry$status !== void 0 ? _entry$status : state.default) !== null && _ref !== void 0 ? _ref : 'closed';
12
+ return (entry === null || entry === void 0 ? void 0 : entry.status) ?? state.default ?? 'closed';
17
13
  }
18
14
  //# sourceMappingURL=getDrawerStatusFromState.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["getDrawerStatusFromState","state","history","Error","entry","find","it","type","status","default"],"sources":["getDrawerStatusFromState.tsx"],"sourcesContent":["import type {\n DrawerNavigationState,\n DrawerStatus,\n ParamListBase,\n} from '@react-navigation/native';\n\nexport default function getDrawerStatusFromState(\n state: DrawerNavigationState<ParamListBase>\n): DrawerStatus {\n if (state.history == null) {\n throw new Error(\n \"Couldn't find the drawer status in the state object. Is it a valid state object of drawer navigator?\"\n );\n }\n\n const entry = state.history.find((it) => it.type === 'drawer') as\n | { type: 'drawer'; status: DrawerStatus }\n | undefined;\n\n return entry?.status ?? state.default ?? 'closed';\n}\n"],"mappings":";;;;;;;AAMe,SAASA,wBAAT,CACbC,KADa,EAEC;EAAA;;EACd,IAAIA,KAAK,CAACC,OAAN,IAAiB,IAArB,EAA2B;IACzB,MAAM,IAAIC,KAAJ,CACJ,sGADI,CAAN;EAGD;;EAED,MAAMC,KAAK,GAAGH,KAAK,CAACC,OAAN,CAAcG,IAAd,CAAoBC,EAAD,IAAQA,EAAE,CAACC,IAAH,KAAY,QAAvC,CAAd;EAIA,gCAAOH,KAAP,aAAOA,KAAP,uBAAOA,KAAK,CAAEI,MAAd,yDAAwBP,KAAK,CAACQ,OAA9B,uCAAyC,QAAzC;AACD"}
1
+ {"version":3,"names":["getDrawerStatusFromState","state","history","Error","entry","find","it","type","status","default"],"sourceRoot":"../../src","sources":["getDrawerStatusFromState.tsx"],"mappings":";;;;;;AAMe,SAASA,wBAAwB,CAC9CC,KAA2C,EAC7B;EACd,IAAIA,KAAK,CAACC,OAAO,IAAI,IAAI,EAAE;IACzB,MAAM,IAAIC,KAAK,CACb,sGAAsG,CACvG;EACH;EAEA,MAAMC,KAAK,GAAGH,KAAK,CAACC,OAAO,CAACG,IAAI,CAAEC,EAAE,IAAKA,EAAE,CAACC,IAAI,KAAK,QAAQ,CAEhD;EAEb,OAAO,CAAAH,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEI,MAAM,KAAIP,KAAK,CAACQ,OAAO,IAAI,QAAQ;AACnD"}
@@ -4,24 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = useDrawerProgress;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  var _DrawerProgressContext = _interopRequireDefault(require("./DrawerProgressContext"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
18
12
  function useDrawerProgress() {
19
13
  const progress = React.useContext(_DrawerProgressContext.default);
20
-
21
14
  if (progress === undefined) {
22
15
  throw new Error("Couldn't find a drawer. Is your component inside a drawer navigator?");
23
16
  }
24
-
25
17
  return progress;
26
18
  }
27
19
  //# sourceMappingURL=useDrawerProgress.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useDrawerProgress","progress","React","useContext","DrawerProgressContext","undefined","Error"],"sources":["useDrawerProgress.tsx"],"sourcesContent":["import * as React from 'react';\nimport type Animated from 'react-native-reanimated';\n\nimport DrawerProgressContext from './DrawerProgressContext';\n\nexport default function useDrawerProgress():\n | Readonly<Animated.SharedValue<number>>\n | Animated.Node<number> {\n const progress = React.useContext(DrawerProgressContext);\n\n if (progress === undefined) {\n throw new Error(\n \"Couldn't find a drawer. Is your component inside a drawer navigator?\"\n );\n }\n\n return progress;\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;;;AAEe,SAASA,iBAAT,GAEW;EACxB,MAAMC,QAAQ,GAAGC,KAAK,CAACC,UAAN,CAAiBC,8BAAjB,CAAjB;;EAEA,IAAIH,QAAQ,KAAKI,SAAjB,EAA4B;IAC1B,MAAM,IAAIC,KAAJ,CACJ,sEADI,CAAN;EAGD;;EAED,OAAOL,QAAP;AACD"}
1
+ {"version":3,"names":["useDrawerProgress","progress","React","useContext","DrawerProgressContext","undefined","Error"],"sourceRoot":"../../src","sources":["useDrawerProgress.tsx"],"mappings":";;;;;;AAAA;AAGA;AAA4D;AAAA;AAAA;AAE7C,SAASA,iBAAiB,GAEf;EACxB,MAAMC,QAAQ,GAAGC,KAAK,CAACC,UAAU,CAACC,8BAAqB,CAAC;EAExD,IAAIH,QAAQ,KAAKI,SAAS,EAAE;IAC1B,MAAM,IAAIC,KAAK,CACb,sEAAsE,CACvE;EACH;EAEA,OAAOL,QAAQ;AACjB"}
@@ -4,28 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = useDrawerStatus;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  var _DrawerStatusContext = _interopRequireDefault(require("./DrawerStatusContext"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
-
18
12
  /**
19
13
  * Hook to detect if the drawer's status in a parent navigator.
20
14
  * Returns 'open' if the drawer is open, 'closed' if the drawer is closed.
21
15
  */
22
16
  function useDrawerStatus() {
23
17
  const drawerStatus = React.useContext(_DrawerStatusContext.default);
24
-
25
18
  if (drawerStatus === undefined) {
26
19
  throw new Error("Couldn't find a drawer. Is your component inside a drawer navigator?");
27
20
  }
28
-
29
21
  return drawerStatus;
30
22
  }
31
23
  //# sourceMappingURL=useDrawerStatus.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useDrawerStatus","drawerStatus","React","useContext","DrawerStatusContext","undefined","Error"],"sources":["useDrawerStatus.tsx"],"sourcesContent":["import type { DrawerStatus } from '@react-navigation/native';\nimport * as React from 'react';\n\nimport DrawerStatusContext from './DrawerStatusContext';\n\n/**\n * Hook to detect if the drawer's status in a parent navigator.\n * Returns 'open' if the drawer is open, 'closed' if the drawer is closed.\n */\nexport default function useDrawerStatus(): DrawerStatus {\n const drawerStatus = React.useContext(DrawerStatusContext);\n\n if (drawerStatus === undefined) {\n throw new Error(\n \"Couldn't find a drawer. Is your component inside a drawer navigator?\"\n );\n }\n\n return drawerStatus;\n}\n"],"mappings":";;;;;;;AACA;;AAEA;;;;;;;;AAEA;AACA;AACA;AACA;AACe,SAASA,eAAT,GAAyC;EACtD,MAAMC,YAAY,GAAGC,KAAK,CAACC,UAAN,CAAiBC,4BAAjB,CAArB;;EAEA,IAAIH,YAAY,KAAKI,SAArB,EAAgC;IAC9B,MAAM,IAAIC,KAAJ,CACJ,sEADI,CAAN;EAGD;;EAED,OAAOL,YAAP;AACD"}
1
+ {"version":3,"names":["useDrawerStatus","drawerStatus","React","useContext","DrawerStatusContext","undefined","Error"],"sourceRoot":"../../src","sources":["useDrawerStatus.tsx"],"mappings":";;;;;;AACA;AAEA;AAAwD;AAAA;AAAA;AAExD;AACA;AACA;AACA;AACe,SAASA,eAAe,GAAiB;EACtD,MAAMC,YAAY,GAAGC,KAAK,CAACC,UAAU,CAACC,4BAAmB,CAAC;EAE1D,IAAIH,YAAY,KAAKI,SAAS,EAAE;IAC9B,MAAM,IAAIC,KAAK,CACb,sEAAsE,CACvE;EACH;EAEA,OAAOL,YAAY;AACrB"}
@@ -4,21 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = DrawerContent;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  var _DrawerContentScrollView = _interopRequireDefault(require("./DrawerContentScrollView"));
11
-
12
9
  var _DrawerItemList = _interopRequireDefault(require("./DrawerItemList"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
-
18
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
-
20
13
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
-
22
14
  function DrawerContent(_ref) {
23
15
  let {
24
16
  descriptors,
@@ -1 +1 @@
1
- {"version":3,"names":["DrawerContent","descriptors","state","rest","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerContentStyle","drawerContentContainerStyle"],"sources":["DrawerContent.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { DrawerContentComponentProps } from '../types';\nimport DrawerContentScrollView from './DrawerContentScrollView';\nimport DrawerItemList from './DrawerItemList';\n\nexport default function DrawerContent({\n descriptors,\n state,\n ...rest\n}: DrawerContentComponentProps) {\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor.options;\n\n const { drawerContentStyle, drawerContentContainerStyle } = focusedOptions;\n\n return (\n <DrawerContentScrollView\n {...rest}\n contentContainerStyle={drawerContentContainerStyle}\n style={drawerContentStyle}\n >\n <DrawerItemList descriptors={descriptors} state={state} {...rest} />\n </DrawerContentScrollView>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;;;;;;;;;AAEe,SAASA,aAAT,OAIiB;EAAA,IAJM;IACpCC,WADoC;IAEpCC,KAFoC;IAGpC,GAAGC;EAHiC,CAIN;EAC9B,MAAMC,YAAY,GAAGF,KAAK,CAACG,MAAN,CAAaH,KAAK,CAACI,KAAnB,CAArB;EACA,MAAMC,iBAAiB,GAAGN,WAAW,CAACG,YAAY,CAACI,GAAd,CAArC;EACA,MAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAzC;EAEA,MAAM;IAAEC,kBAAF;IAAsBC;EAAtB,IAAsDH,cAA5D;EAEA,oBACE,oBAAC,gCAAD,eACMN,IADN;IAEE,qBAAqB,EAAES,2BAFzB;IAGE,KAAK,EAAED;EAHT,iBAKE,oBAAC,uBAAD;IAAgB,WAAW,EAAEV,WAA7B;IAA0C,KAAK,EAAEC;EAAjD,GAA4DC,IAA5D,EALF,CADF;AASD"}
1
+ {"version":3,"names":["DrawerContent","descriptors","state","rest","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerContentStyle","drawerContentContainerStyle"],"sourceRoot":"../../src","sources":["DrawerContent.tsx"],"mappings":";;;;;;AAAA;AAGA;AACA;AAA8C;AAAA;AAAA;AAAA;AAE/B,SAASA,aAAa,OAIL;EAAA,IAJM;IACpCC,WAAW;IACXC,KAAK;IACL,GAAGC;EACwB,CAAC;EAC5B,MAAMC,YAAY,GAAGF,KAAK,CAACG,MAAM,CAACH,KAAK,CAACI,KAAK,CAAC;EAC9C,MAAMC,iBAAiB,GAAGN,WAAW,CAACG,YAAY,CAACI,GAAG,CAAC;EACvD,MAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAO;EAEhD,MAAM;IAAEC,kBAAkB;IAAEC;EAA4B,CAAC,GAAGH,cAAc;EAE1E,oBACE,oBAAC,gCAAuB,eAClBN,IAAI;IACR,qBAAqB,EAAES,2BAA4B;IACnD,KAAK,EAAED;EAAmB,iBAE1B,oBAAC,uBAAc;IAAC,WAAW,EAAEV,WAAY;IAAC,KAAK,EAAEC;EAAM,GAAKC,IAAI,EAAI,CAC5C;AAE9B"}
@@ -4,23 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var React = _interopRequireWildcard(require("react"));
9
-
10
8
  var _reactNative = require("react-native");
11
-
12
9
  var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
13
-
14
10
  var _DrawerPositionContext = _interopRequireDefault(require("../utils/DrawerPositionContext"));
15
-
16
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
14
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
-
24
15
  function DrawerContentScrollView(_ref, ref) {
25
16
  let {
26
17
  contentContainerStyle,
@@ -41,11 +32,8 @@ function DrawerContentScrollView(_ref, ref) {
41
32
  style: [styles.container, style]
42
33
  }), children);
43
34
  }
44
-
45
35
  var _default = /*#__PURE__*/React.forwardRef(DrawerContentScrollView);
46
-
47
36
  exports.default = _default;
48
-
49
37
  const styles = _reactNative.StyleSheet.create({
50
38
  container: {
51
39
  flex: 1
@@ -1 +1 @@
1
- {"version":3,"names":["DrawerContentScrollView","ref","contentContainerStyle","style","children","rest","drawerPosition","React","useContext","DrawerPositionContext","insets","useSafeAreaInsets","isRight","I18nManager","getConstants","isRTL","paddingTop","top","paddingStart","left","paddingEnd","right","styles","container","forwardRef","StyleSheet","create","flex"],"sources":["DrawerContentScrollView.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n I18nManager,\n ScrollView,\n ScrollViewProps,\n StyleSheet,\n} from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport DrawerPositionContext from '../utils/DrawerPositionContext';\n\ntype Props = ScrollViewProps & {\n children: React.ReactNode;\n};\n\nfunction DrawerContentScrollView(\n { contentContainerStyle, style, children, ...rest }: Props,\n ref?: React.Ref<ScrollView>\n) {\n const drawerPosition = React.useContext(DrawerPositionContext);\n const insets = useSafeAreaInsets();\n\n const isRight = I18nManager.getConstants().isRTL\n ? drawerPosition === 'left'\n : drawerPosition === 'right';\n\n return (\n <ScrollView\n {...rest}\n ref={ref}\n contentContainerStyle={[\n {\n paddingTop: insets.top + 4,\n paddingStart: !isRight ? insets.left : 0,\n paddingEnd: isRight ? insets.right : 0,\n },\n contentContainerStyle,\n ]}\n style={[styles.container, style]}\n >\n {children}\n </ScrollView>\n );\n}\n\nexport default React.forwardRef(DrawerContentScrollView);\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAMA;;AAEA;;;;;;;;;;AAMA,SAASA,uBAAT,OAEEC,GAFF,EAGE;EAAA,IAFA;IAAEC,qBAAF;IAAyBC,KAAzB;IAAgCC,QAAhC;IAA0C,GAAGC;EAA7C,CAEA;EACA,MAAMC,cAAc,GAAGC,KAAK,CAACC,UAAN,CAAiBC,8BAAjB,CAAvB;EACA,MAAMC,MAAM,GAAG,IAAAC,6CAAA,GAAf;EAEA,MAAMC,OAAO,GAAGC,wBAAA,CAAYC,YAAZ,GAA2BC,KAA3B,GACZT,cAAc,KAAK,MADP,GAEZA,cAAc,KAAK,OAFvB;EAIA,oBACE,oBAAC,uBAAD,eACMD,IADN;IAEE,GAAG,EAAEJ,GAFP;IAGE,qBAAqB,EAAE,CACrB;MACEe,UAAU,EAAEN,MAAM,CAACO,GAAP,GAAa,CAD3B;MAEEC,YAAY,EAAE,CAACN,OAAD,GAAWF,MAAM,CAACS,IAAlB,GAAyB,CAFzC;MAGEC,UAAU,EAAER,OAAO,GAAGF,MAAM,CAACW,KAAV,GAAkB;IAHvC,CADqB,EAMrBnB,qBANqB,CAHzB;IAWE,KAAK,EAAE,CAACoB,MAAM,CAACC,SAAR,EAAmBpB,KAAnB;EAXT,IAaGC,QAbH,CADF;AAiBD;;4BAEcG,KAAK,CAACiB,UAAN,CAAiBxB,uBAAjB,C;;;;AAEf,MAAMsB,MAAM,GAAGG,uBAAA,CAAWC,MAAX,CAAkB;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE;EADG;AADoB,CAAlB,CAAf"}
1
+ {"version":3,"names":["DrawerContentScrollView","ref","contentContainerStyle","style","children","rest","drawerPosition","React","useContext","DrawerPositionContext","insets","useSafeAreaInsets","isRight","I18nManager","getConstants","isRTL","paddingTop","top","paddingStart","left","paddingEnd","right","styles","container","forwardRef","StyleSheet","create","flex"],"sourceRoot":"../../src","sources":["DrawerContentScrollView.tsx"],"mappings":";;;;;;AAAA;AACA;AAMA;AAEA;AAAmE;AAAA;AAAA;AAAA;AAMnE,SAASA,uBAAuB,OAE9BC,GAA2B,EAC3B;EAAA,IAFA;IAAEC,qBAAqB;IAAEC,KAAK;IAAEC,QAAQ;IAAE,GAAGC;EAAY,CAAC;EAG1D,MAAMC,cAAc,GAAGC,KAAK,CAACC,UAAU,CAACC,8BAAqB,CAAC;EAC9D,MAAMC,MAAM,GAAG,IAAAC,6CAAiB,GAAE;EAElC,MAAMC,OAAO,GAAGC,wBAAW,CAACC,YAAY,EAAE,CAACC,KAAK,GAC5CT,cAAc,KAAK,MAAM,GACzBA,cAAc,KAAK,OAAO;EAE9B,oBACE,oBAAC,uBAAU,eACLD,IAAI;IACR,GAAG,EAAEJ,GAAI;IACT,qBAAqB,EAAE,CACrB;MACEe,UAAU,EAAEN,MAAM,CAACO,GAAG,GAAG,CAAC;MAC1BC,YAAY,EAAE,CAACN,OAAO,GAAGF,MAAM,CAACS,IAAI,GAAG,CAAC;MACxCC,UAAU,EAAER,OAAO,GAAGF,MAAM,CAACW,KAAK,GAAG;IACvC,CAAC,EACDnB,qBAAqB,CACrB;IACF,KAAK,EAAE,CAACoB,MAAM,CAACC,SAAS,EAAEpB,KAAK;EAAE,IAEhCC,QAAQ,CACE;AAEjB;AAAC,4BAEcG,KAAK,CAACiB,UAAU,CAACxB,uBAAuB,CAAC;AAAA;AAExD,MAAMsB,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}
@@ -4,25 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = DrawerItem;
7
-
8
7
  var _elements = require("@react-navigation/elements");
9
-
10
8
  var _native = require("@react-navigation/native");
11
-
12
9
  var _color = _interopRequireDefault(require("color"));
13
-
14
10
  var React = _interopRequireWildcard(require("react"));
15
-
16
11
  var _reactNative = require("react-native");
17
-
18
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
-
20
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
24
15
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
-
26
16
  const LinkPressable = _ref => {
27
17
  let {
28
18
  children,
@@ -35,7 +25,6 @@ const LinkPressable = _ref => {
35
25
  accessibilityRole,
36
26
  ...rest
37
27
  } = _ref;
38
-
39
28
  if (_reactNative.Platform.OS === 'web' && to) {
40
29
  // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.
41
30
  // We need to use `onClick` to be able to prevent default browser handling of links.
@@ -43,18 +32,20 @@ const LinkPressable = _ref => {
43
32
  to: to,
44
33
  style: [styles.button, style],
45
34
  onPress: e => {
46
- if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && ( // ignore clicks with modifier keys
35
+ if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && (
36
+ // ignore clicks with modifier keys
47
37
  e.button == null || e.button === 0) // ignore everything but left clicks
48
38
  ) {
49
39
  e.preventDefault();
50
40
  onPress === null || onPress === void 0 ? void 0 : onPress(e);
51
41
  }
52
- } // types for PressableProps and TextProps are incompatible with each other by `null` so we
42
+ }
43
+ // types for PressableProps and TextProps are incompatible with each other by `null` so we
53
44
  // can't use {...rest} for these 3 props
54
45
  ,
55
- onLongPress: onLongPress !== null && onLongPress !== void 0 ? onLongPress : undefined,
56
- onPressIn: onPressIn !== null && onPressIn !== void 0 ? onPressIn : undefined,
57
- onPressOut: onPressOut !== null && onPressOut !== void 0 ? onPressOut : undefined
46
+ onLongPress: onLongPress ?? undefined,
47
+ onPressIn: onPressIn ?? undefined,
48
+ onPressOut: onPressOut ?? undefined
58
49
  }), children);
59
50
  } else {
60
51
  return /*#__PURE__*/React.createElement(_elements.PlatformPressable, _extends({}, rest, {
@@ -65,11 +56,10 @@ const LinkPressable = _ref => {
65
56
  }, children));
66
57
  }
67
58
  };
59
+
68
60
  /**
69
61
  * A component used to show an action item with an icon and a label in a navigation drawer.
70
62
  */
71
-
72
-
73
63
  function DrawerItem(props) {
74
64
  const {
75
65
  colors
@@ -91,11 +81,9 @@ function DrawerItem(props) {
91
81
  pressOpacity,
92
82
  ...rest
93
83
  } = props;
94
-
95
84
  const {
96
85
  borderRadius = 4
97
86
  } = _reactNative.StyleSheet.flatten(style || {});
98
-
99
87
  const color = focused ? activeTintColor : inactiveTintColor;
100
88
  const backgroundColor = focused ? activeBackgroundColor : inactiveBackgroundColor;
101
89
  const iconNode = icon ? icon({
@@ -139,7 +127,6 @@ function DrawerItem(props) {
139
127
  focused
140
128
  })))));
141
129
  }
142
-
143
130
  const styles = _reactNative.StyleSheet.create({
144
131
  container: {
145
132
  marginHorizontal: 10,
@@ -1 +1 @@
1
- {"version":3,"names":["LinkPressable","children","style","onPress","onLongPress","onPressIn","onPressOut","to","accessibilityRole","rest","Platform","OS","styles","button","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","undefined","DrawerItem","props","colors","useTheme","icon","label","labelStyle","focused","allowFontScaling","activeTintColor","primary","inactiveTintColor","Color","text","alpha","rgb","string","activeBackgroundColor","inactiveBackgroundColor","pressColor","pressOpacity","borderRadius","StyleSheet","flatten","color","backgroundColor","iconNode","size","container","wrapper","selected","marginLeft","marginVertical","fontWeight","create","marginHorizontal","overflow","flexDirection","alignItems","padding","marginRight","flex","display"],"sources":["DrawerItem.tsx"],"sourcesContent":["import { PlatformPressable } from '@react-navigation/elements';\nimport { Link, useTheme } from '@react-navigation/native';\nimport Color from 'color';\nimport * as React from 'react';\nimport {\n Platform,\n StyleProp,\n StyleSheet,\n Text,\n TextStyle,\n View,\n ViewStyle,\n} from 'react-native';\n\ntype Props = {\n /**\n * The label text of the item.\n */\n label:\n | string\n | ((props: { focused: boolean; color: string }) => React.ReactNode);\n /**\n * Icon to display for the `DrawerItem`.\n */\n icon?: (props: {\n focused: boolean;\n size: number;\n color: string;\n }) => React.ReactNode;\n /**\n * URL to use for the link to the tab.\n */\n to?: string;\n /**\n * Whether to highlight the drawer item as active.\n */\n focused?: boolean;\n /**\n * Function to execute on press.\n */\n onPress: () => void;\n /**\n * Color for the icon and label when the item is active.\n */\n activeTintColor?: string;\n /**\n * Color for the icon and label when the item is inactive.\n */\n inactiveTintColor?: string;\n /**\n * Background color for item when its active.\n */\n activeBackgroundColor?: string;\n /**\n * Background color for item when its inactive.\n */\n inactiveBackgroundColor?: string;\n /**\n * Color of the touchable effect on press.\n * Only supported on Android.\n *\n * @platform android\n */\n pressColor?: string;\n /**\n * Opacity of the touchable effect on press.\n * Only supported on iOS.\n *\n * @platform ios\n */\n pressOpacity?: number;\n /**\n * Style object for the label element.\n */\n labelStyle?: StyleProp<TextStyle>;\n /**\n * Style object for the wrapper element.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Whether label font should scale to respect Text Size accessibility settings.\n */\n allowFontScaling?: boolean;\n};\n\nconst LinkPressable = ({\n children,\n style,\n onPress,\n onLongPress,\n onPressIn,\n onPressOut,\n to,\n accessibilityRole,\n ...rest\n}: Omit<React.ComponentProps<typeof PlatformPressable>, 'style'> & {\n style: StyleProp<ViewStyle>;\n} & {\n to?: string;\n children: React.ReactNode;\n onPress?: () => void;\n}) => {\n if (Platform.OS === 'web' && to) {\n // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.\n // We need to use `onClick` to be able to prevent default browser handling of links.\n return (\n <Link\n {...rest}\n to={to}\n style={[styles.button, style]}\n onPress={(e: any) => {\n if (\n !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys\n (e.button == null || e.button === 0) // ignore everything but left clicks\n ) {\n e.preventDefault();\n onPress?.(e);\n }\n }}\n // types for PressableProps and TextProps are incompatible with each other by `null` so we\n // can't use {...rest} for these 3 props\n onLongPress={onLongPress ?? undefined}\n onPressIn={onPressIn ?? undefined}\n onPressOut={onPressOut ?? undefined}\n >\n {children}\n </Link>\n );\n } else {\n return (\n <PlatformPressable\n {...rest}\n accessibilityRole={accessibilityRole}\n onPress={onPress}\n >\n <View style={style}>{children}</View>\n </PlatformPressable>\n );\n }\n};\n\n/**\n * A component used to show an action item with an icon and a label in a navigation drawer.\n */\nexport default function DrawerItem(props: Props) {\n const { colors } = useTheme();\n\n const {\n icon,\n label,\n labelStyle,\n to,\n focused = false,\n allowFontScaling,\n activeTintColor = colors.primary,\n inactiveTintColor = Color(colors.text).alpha(0.68).rgb().string(),\n activeBackgroundColor = Color(activeTintColor).alpha(0.12).rgb().string(),\n inactiveBackgroundColor = 'transparent',\n style,\n onPress,\n pressColor,\n pressOpacity,\n ...rest\n } = props;\n\n const { borderRadius = 4 } = StyleSheet.flatten(style || {});\n const color = focused ? activeTintColor : inactiveTintColor;\n const backgroundColor = focused\n ? activeBackgroundColor\n : inactiveBackgroundColor;\n\n const iconNode = icon ? icon({ size: 24, focused, color }) : null;\n\n return (\n <View\n collapsable={false}\n {...rest}\n style={[styles.container, { borderRadius, backgroundColor }, style]}\n >\n <LinkPressable\n onPress={onPress}\n style={[styles.wrapper, { borderRadius }]}\n accessibilityRole=\"button\"\n accessibilityState={{ selected: focused }}\n pressColor={pressColor}\n pressOpacity={pressOpacity}\n to={to}\n >\n <React.Fragment>\n {iconNode}\n <View\n style={[\n styles.label,\n { marginLeft: iconNode ? 32 : 0, marginVertical: 5 },\n ]}\n >\n {typeof label === 'string' ? (\n <Text\n numberOfLines={1}\n allowFontScaling={allowFontScaling}\n style={[\n {\n color,\n fontWeight: '500',\n },\n labelStyle,\n ]}\n >\n {label}\n </Text>\n ) : (\n label({ color, focused })\n )}\n </View>\n </React.Fragment>\n </LinkPressable>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n marginHorizontal: 10,\n marginVertical: 4,\n overflow: 'hidden',\n },\n wrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n padding: 8,\n },\n label: {\n marginRight: 32,\n flex: 1,\n },\n button: {\n display: 'flex',\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAiFA,MAAMA,aAAa,GAAG,QAgBhB;EAAA,IAhBiB;IACrBC,QADqB;IAErBC,KAFqB;IAGrBC,OAHqB;IAIrBC,WAJqB;IAKrBC,SALqB;IAMrBC,UANqB;IAOrBC,EAPqB;IAQrBC,iBARqB;IASrB,GAAGC;EATkB,CAgBjB;;EACJ,IAAIC,qBAAA,CAASC,EAAT,KAAgB,KAAhB,IAAyBJ,EAA7B,EAAiC;IAC/B;IACA;IACA,oBACE,oBAAC,YAAD,eACME,IADN;MAEE,EAAE,EAAEF,EAFN;MAGE,KAAK,EAAE,CAACK,MAAM,CAACC,MAAR,EAAgBX,KAAhB,CAHT;MAIE,OAAO,EAAGY,CAAD,IAAY;QACnB,IACE,EAAEA,CAAC,CAACC,OAAF,IAAaD,CAAC,CAACE,MAAf,IAAyBF,CAAC,CAACG,OAA3B,IAAsCH,CAAC,CAACI,QAA1C,OAAuD;QACtDJ,CAAC,CAACD,MAAF,IAAY,IAAZ,IAAoBC,CAAC,CAACD,MAAF,KAAa,CADl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AEmB,KAAF;IAASjB;EAAT,CAAD,CArBT,CAFF,CATF,CALF,CADF;AA6CD;;AAED,MAAMhB,MAAM,GAAG+B,uBAAA,CAAWY,MAAX,CAAkB;EAC/BN,SAAS,EAAE;IACTO,gBAAgB,EAAE,EADT;IAETH,cAAc,EAAE,CAFP;IAGTI,QAAQ,EAAE;EAHD,CADoB;EAM/BP,OAAO,EAAE;IACPQ,aAAa,EAAE,KADR;IAEPC,UAAU,EAAE,QAFL;IAGPC,OAAO,EAAE;EAHF,CANsB;EAW/BlC,KAAK,EAAE;IACLmC,WAAW,EAAE,EADR;IAELC,IAAI,EAAE;EAFD,CAXwB;EAe/BjD,MAAM,EAAE;IACNkD,OAAO,EAAE;EADH;AAfuB,CAAlB,CAAf"}
1
+ {"version":3,"names":["LinkPressable","children","style","onPress","onLongPress","onPressIn","onPressOut","to","accessibilityRole","rest","Platform","OS","styles","button","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","undefined","DrawerItem","props","colors","useTheme","icon","label","labelStyle","focused","allowFontScaling","activeTintColor","primary","inactiveTintColor","Color","text","alpha","rgb","string","activeBackgroundColor","inactiveBackgroundColor","pressColor","pressOpacity","borderRadius","StyleSheet","flatten","color","backgroundColor","iconNode","size","container","wrapper","selected","marginLeft","marginVertical","fontWeight","create","marginHorizontal","overflow","flexDirection","alignItems","padding","marginRight","flex","display"],"sourceRoot":"../../src","sources":["DrawerItem.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAQsB;AAAA;AAAA;AAAA;AAyEtB,MAAMA,aAAa,GAAG,QAgBhB;EAAA,IAhBiB;IACrBC,QAAQ;IACRC,KAAK;IACLC,OAAO;IACPC,WAAW;IACXC,SAAS;IACTC,UAAU;IACVC,EAAE;IACFC,iBAAiB;IACjB,GAAGC;EAOL,CAAC;EACC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAIJ,EAAE,EAAE;IAC/B;IACA;IACA,oBACE,oBAAC,YAAI,eACCE,IA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