@react-navigation/native-stack 7.0.0-rc.3 → 7.0.0-rc.30

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 (142) hide show
  1. package/lib/commonjs/index.js +2 -2
  2. package/lib/commonjs/navigators/createNativeStackNavigator.js +11 -6
  3. package/lib/commonjs/navigators/createNativeStackNavigator.js.map +1 -1
  4. package/lib/commonjs/package.json +1 -0
  5. package/lib/commonjs/utils/debounce.js.map +1 -1
  6. package/lib/commonjs/views/FooterComponent.js +19 -0
  7. package/lib/commonjs/views/FooterComponent.js.map +1 -0
  8. package/lib/commonjs/views/NativeStackView.js +106 -106
  9. package/lib/commonjs/views/NativeStackView.js.map +1 -1
  10. package/lib/commonjs/views/NativeStackView.native.js +221 -219
  11. package/lib/commonjs/views/NativeStackView.native.js.map +1 -1
  12. package/lib/commonjs/views/{HeaderConfig.js → useHeaderConfigProps.js} +84 -43
  13. package/lib/commonjs/views/useHeaderConfigProps.js.map +1 -0
  14. package/lib/module/index.js +4 -2
  15. package/lib/module/index.js.map +1 -1
  16. package/lib/module/navigators/createNativeStackNavigator.js +13 -6
  17. package/lib/module/navigators/createNativeStackNavigator.js.map +1 -1
  18. package/lib/module/package.json +1 -0
  19. package/lib/module/types.js +2 -0
  20. package/lib/module/utils/debounce.js +2 -0
  21. package/lib/module/utils/debounce.js.map +1 -1
  22. package/lib/module/utils/getModalRoutesKeys.js +2 -0
  23. package/lib/module/utils/getModalRoutesKeys.js.map +1 -1
  24. package/lib/module/utils/useAnimatedHeaderHeight.js +2 -0
  25. package/lib/module/utils/useAnimatedHeaderHeight.js.map +1 -1
  26. package/lib/module/utils/useDismissedRouteError.js +2 -0
  27. package/lib/module/utils/useDismissedRouteError.js.map +1 -1
  28. package/lib/module/utils/useInvalidPreventRemoveError.js +2 -0
  29. package/lib/module/utils/useInvalidPreventRemoveError.js.map +1 -1
  30. package/lib/module/views/FontProcessor.js +2 -0
  31. package/lib/module/views/FontProcessor.js.map +1 -1
  32. package/lib/module/views/FontProcessor.native.js +2 -0
  33. package/lib/module/views/FontProcessor.native.js.map +1 -1
  34. package/lib/module/views/FooterComponent.js +14 -0
  35. package/lib/module/views/FooterComponent.js.map +1 -0
  36. package/lib/module/views/NativeStackView.js +110 -108
  37. package/lib/module/views/NativeStackView.js.map +1 -1
  38. package/lib/module/views/NativeStackView.native.js +224 -219
  39. package/lib/module/views/NativeStackView.native.js.map +1 -1
  40. package/lib/module/views/{HeaderConfig.js → useHeaderConfigProps.js} +86 -41
  41. package/lib/module/views/useHeaderConfigProps.js.map +1 -0
  42. package/lib/typescript/commonjs/package.json +1 -0
  43. package/lib/typescript/{src → commonjs/src}/index.d.ts +1 -1
  44. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  45. package/lib/typescript/{src → commonjs/src}/navigators/createNativeStackNavigator.d.ts +3 -4
  46. package/lib/typescript/commonjs/src/navigators/createNativeStackNavigator.d.ts.map +1 -0
  47. package/lib/typescript/{src → commonjs/src}/types.d.ts +112 -34
  48. package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
  49. package/lib/typescript/commonjs/src/utils/debounce.d.ts.map +1 -0
  50. package/lib/typescript/commonjs/src/utils/getModalRoutesKeys.d.ts.map +1 -0
  51. package/lib/typescript/commonjs/src/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
  52. package/lib/typescript/commonjs/src/utils/useDismissedRouteError.d.ts.map +1 -0
  53. package/lib/typescript/commonjs/src/utils/useInvalidPreventRemoveError.d.ts.map +1 -0
  54. package/lib/typescript/commonjs/src/views/FontProcessor.d.ts.map +1 -0
  55. package/lib/typescript/commonjs/src/views/FontProcessor.native.d.ts.map +1 -0
  56. package/lib/typescript/commonjs/src/views/FooterComponent.d.ts +7 -0
  57. package/lib/typescript/commonjs/src/views/FooterComponent.d.ts.map +1 -0
  58. package/lib/typescript/commonjs/src/views/NativeStackView.d.ts +11 -0
  59. package/lib/typescript/commonjs/src/views/NativeStackView.d.ts.map +1 -0
  60. package/lib/typescript/commonjs/src/views/NativeStackView.native.d.ts +11 -0
  61. package/lib/typescript/commonjs/src/views/NativeStackView.native.d.ts.map +1 -0
  62. package/lib/typescript/commonjs/src/views/useHeaderConfigProps.d.ts +41 -0
  63. package/lib/typescript/commonjs/src/views/useHeaderConfigProps.d.ts.map +1 -0
  64. package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -0
  65. package/lib/typescript/module/package.json +1 -0
  66. package/lib/typescript/module/src/index.d.ts +17 -0
  67. package/lib/typescript/module/src/index.d.ts.map +1 -0
  68. package/lib/typescript/module/src/navigators/createNativeStackNavigator.d.ts +16 -0
  69. package/lib/typescript/module/src/navigators/createNativeStackNavigator.d.ts.map +1 -0
  70. package/lib/typescript/module/src/types.d.ts +623 -0
  71. package/lib/typescript/module/src/types.d.ts.map +1 -0
  72. package/lib/typescript/module/src/utils/debounce.d.ts +2 -0
  73. package/lib/typescript/module/src/utils/debounce.d.ts.map +1 -0
  74. package/lib/typescript/module/src/utils/getModalRoutesKeys.d.ts +4 -0
  75. package/lib/typescript/module/src/utils/getModalRoutesKeys.d.ts.map +1 -0
  76. package/lib/typescript/module/src/utils/useAnimatedHeaderHeight.d.ts +5 -0
  77. package/lib/typescript/module/src/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
  78. package/lib/typescript/module/src/utils/useDismissedRouteError.d.ts +6 -0
  79. package/lib/typescript/module/src/utils/useDismissedRouteError.d.ts.map +1 -0
  80. package/lib/typescript/module/src/utils/useInvalidPreventRemoveError.d.ts +3 -0
  81. package/lib/typescript/module/src/utils/useInvalidPreventRemoveError.d.ts.map +1 -0
  82. package/lib/typescript/module/src/views/FontProcessor.d.ts +2 -0
  83. package/lib/typescript/module/src/views/FontProcessor.d.ts.map +1 -0
  84. package/lib/typescript/module/src/views/FontProcessor.native.d.ts +2 -0
  85. package/lib/typescript/module/src/views/FontProcessor.native.d.ts.map +1 -0
  86. package/lib/typescript/module/src/views/FooterComponent.d.ts +7 -0
  87. package/lib/typescript/module/src/views/FooterComponent.d.ts.map +1 -0
  88. package/lib/typescript/module/src/views/NativeStackView.d.ts +11 -0
  89. package/lib/typescript/module/src/views/NativeStackView.d.ts.map +1 -0
  90. package/lib/typescript/module/src/views/NativeStackView.native.d.ts +11 -0
  91. package/lib/typescript/module/src/views/NativeStackView.native.d.ts.map +1 -0
  92. package/lib/typescript/module/src/views/useHeaderConfigProps.d.ts +41 -0
  93. package/lib/typescript/module/src/views/useHeaderConfigProps.d.ts.map +1 -0
  94. package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -0
  95. package/package.json +41 -18
  96. package/src/index.tsx +2 -0
  97. package/src/navigators/createNativeStackNavigator.tsx +6 -7
  98. package/src/types.tsx +106 -34
  99. package/src/utils/debounce.tsx +1 -1
  100. package/src/views/FooterComponent.tsx +10 -0
  101. package/src/views/NativeStackView.native.tsx +167 -202
  102. package/src/views/NativeStackView.tsx +62 -50
  103. package/src/views/{HeaderConfig.tsx → useHeaderConfigProps.tsx} +80 -68
  104. package/lib/commonjs/views/DebugContainer.js +0 -19
  105. package/lib/commonjs/views/DebugContainer.js.map +0 -1
  106. package/lib/commonjs/views/DebugContainer.native.js +0 -42
  107. package/lib/commonjs/views/DebugContainer.native.js.map +0 -1
  108. package/lib/commonjs/views/HeaderConfig.js.map +0 -1
  109. package/lib/module/views/DebugContainer.js +0 -11
  110. package/lib/module/views/DebugContainer.js.map +0 -1
  111. package/lib/module/views/DebugContainer.native.js +0 -33
  112. package/lib/module/views/DebugContainer.native.js.map +0 -1
  113. package/lib/module/views/HeaderConfig.js.map +0 -1
  114. package/lib/typescript/src/index.d.ts.map +0 -1
  115. package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts.map +0 -1
  116. package/lib/typescript/src/types.d.ts.map +0 -1
  117. package/lib/typescript/src/utils/debounce.d.ts.map +0 -1
  118. package/lib/typescript/src/utils/getModalRoutesKeys.d.ts.map +0 -1
  119. package/lib/typescript/src/utils/useAnimatedHeaderHeight.d.ts.map +0 -1
  120. package/lib/typescript/src/utils/useDismissedRouteError.d.ts.map +0 -1
  121. package/lib/typescript/src/utils/useInvalidPreventRemoveError.d.ts.map +0 -1
  122. package/lib/typescript/src/views/DebugContainer.d.ts +0 -10
  123. package/lib/typescript/src/views/DebugContainer.d.ts.map +0 -1
  124. package/lib/typescript/src/views/DebugContainer.native.d.ts +0 -15
  125. package/lib/typescript/src/views/DebugContainer.native.d.ts.map +0 -1
  126. package/lib/typescript/src/views/FontProcessor.d.ts.map +0 -1
  127. package/lib/typescript/src/views/FontProcessor.native.d.ts.map +0 -1
  128. package/lib/typescript/src/views/HeaderConfig.d.ts +0 -11
  129. package/lib/typescript/src/views/HeaderConfig.d.ts.map +0 -1
  130. package/lib/typescript/src/views/NativeStackView.d.ts +0 -11
  131. package/lib/typescript/src/views/NativeStackView.d.ts.map +0 -1
  132. package/lib/typescript/src/views/NativeStackView.native.d.ts +0 -11
  133. package/lib/typescript/src/views/NativeStackView.native.d.ts.map +0 -1
  134. package/src/views/DebugContainer.native.tsx +0 -36
  135. package/src/views/DebugContainer.tsx +0 -14
  136. /package/lib/typescript/{src → commonjs/src}/utils/debounce.d.ts +0 -0
  137. /package/lib/typescript/{src → commonjs/src}/utils/getModalRoutesKeys.d.ts +0 -0
  138. /package/lib/typescript/{src → commonjs/src}/utils/useAnimatedHeaderHeight.d.ts +0 -0
  139. /package/lib/typescript/{src → commonjs/src}/utils/useDismissedRouteError.d.ts +0 -0
  140. /package/lib/typescript/{src → commonjs/src}/utils/useInvalidPreventRemoveError.d.ts +0 -0
  141. /package/lib/typescript/{src → commonjs/src}/views/FontProcessor.d.ts +0 -0
  142. /package/lib/typescript/{src → commonjs/src}/views/FontProcessor.native.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"getModalRoutesKeys.d.ts","sourceRoot":"","sources":["../../../../src/utils/getModalRoutesKeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEzD,eAAO,MAAM,iBAAiB,WACpB,KAAK,CAAC,MAAM,CAAC,EAAE,eACV,wBAAwB,aAc/B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAnimatedHeaderHeight.d.ts","sourceRoot":"","sources":["../../../../src/utils/useAnimatedHeaderHeight.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,eAAO,MAAM,2BAA2B,mEAE5B,CAAC;AAEb,wBAAgB,uBAAuB,2CAUtC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDismissedRouteError.d.ts","sourceRoot":"","sources":["../../../../src/utils/useDismissedRouteError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC;;EAsB3C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useInvalidPreventRemoveError.d.ts","sourceRoot":"","sources":["../../../../src/utils/useInvalidPreventRemoveError.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEzD,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,wBAAwB,QAwBtC"}
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- import { type ViewProps } from 'react-native';
3
- import type { StackPresentationTypes } from 'react-native-screens';
4
- type ContainerProps = ViewProps & {
5
- stackPresentation: StackPresentationTypes;
6
- children: React.ReactNode;
7
- };
8
- export declare function DebugContainer(props: ContainerProps): React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=DebugContainer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DebugContainer.d.ts","sourceRoot":"","sources":["../../../../src/views/DebugContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,KAAK,cAAc,GAAG,SAAS,GAAG;IAChC,iBAAiB,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,qBAInD"}
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import { type ViewProps } from 'react-native';
3
- import type { StackPresentationTypes } from 'react-native-screens';
4
- type ContainerProps = ViewProps & {
5
- stackPresentation: StackPresentationTypes;
6
- children: React.ReactNode;
7
- };
8
- /**
9
- * This view must *not* be flattened.
10
- * See https://github.com/software-mansion/react-native-screens/pull/1825
11
- * for detailed explanation.
12
- */
13
- export declare let DebugContainer: (props: ContainerProps) => React.JSX.Element;
14
- export {};
15
- //# sourceMappingURL=DebugContainer.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DebugContainer.native.d.ts","sourceRoot":"","sources":["../../../../src/views/DebugContainer.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,KAAK,cAAc,GAAG,SAAS,GAAG;IAChC,iBAAiB,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,eAAO,IAAI,cAAc,UAAW,cAAc,sBAEjD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FontProcessor.d.ts","sourceRoot":"","sources":["../../../../src/views/FontProcessor.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAC1B,CAAC,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GACxB,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAExB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FontProcessor.native.d.ts","sourceRoot":"","sources":["../../../../src/views/FontProcessor.native.tsx"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAC1B,YAAY,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GACnC,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAMxB"}
@@ -1,11 +0,0 @@
1
- import { type Route } from '@react-navigation/native';
2
- import type { NativeStackNavigationOptions } from '../types';
3
- type Props = NativeStackNavigationOptions & {
4
- headerTopInsetEnabled: boolean;
5
- headerHeight: number;
6
- route: Route<string>;
7
- canGoBack: boolean;
8
- };
9
- export declare function HeaderConfig({ headerBackImageSource, headerBackButtonMenuEnabled, headerBackTitle, headerBackTitleStyle, headerBackTitleVisible, headerBackVisible, headerShadowVisible, headerLargeStyle, headerLargeTitle, headerLargeTitleShadowVisible, headerLargeTitleStyle, headerBackground, headerLeft, headerRight, headerShown, headerStyle, headerBlurEffect, headerTintColor, headerTitle, headerTitleAlign, headerTitleStyle, headerTransparent, headerSearchBarOptions, headerTopInsetEnabled, route, title, canGoBack, }: Props): JSX.Element;
10
- export {};
11
- //# sourceMappingURL=HeaderConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderConfig.d.ts","sourceRoot":"","sources":["../../../../src/views/HeaderConfig.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAuB,MAAM,0BAA0B,CAAC;AAc3E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAG7D,KAAK,KAAK,GAAG,4BAA4B,GAAG;IAC1C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,qBAAqB,EACrB,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,EACpB,sBAA6B,EAC7B,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,EACL,KAAK,EACL,SAAS,GACV,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAwOrB"}
@@ -1,11 +0,0 @@
1
- import { type ParamListBase, type StackNavigationState } from '@react-navigation/native';
2
- import * as React from 'react';
3
- import type { NativeStackDescriptorMap, NativeStackNavigationHelpers } from '../types';
4
- type Props = {
5
- state: StackNavigationState<ParamListBase>;
6
- navigation: NativeStackNavigationHelpers;
7
- descriptors: NativeStackDescriptorMap;
8
- };
9
- export declare function NativeStackView({ state, descriptors }: Props): React.JSX.Element;
10
- export {};
11
- //# sourceMappingURL=NativeStackView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NativeStackView.d.ts","sourceRoot":"","sources":["../../../../src/views/NativeStackView.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAG1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EACV,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAG3C,UAAU,EAAE,4BAA4B,CAAC;IACzC,WAAW,EAAE,wBAAwB,CAAC;CACvC,CAAC;AAOF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,KAAK,qBA8J5D"}
@@ -1,11 +0,0 @@
1
- import { type ParamListBase, type StackNavigationState } from '@react-navigation/native';
2
- import * as React from 'react';
3
- import type { NativeStackDescriptorMap, NativeStackNavigationHelpers } from '../types';
4
- type Props = {
5
- state: StackNavigationState<ParamListBase>;
6
- navigation: NativeStackNavigationHelpers;
7
- descriptors: NativeStackDescriptorMap;
8
- };
9
- export declare function NativeStackView({ state, navigation, descriptors }: Props): React.JSX.Element;
10
- export {};
11
- //# sourceMappingURL=NativeStackView.native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NativeStackView.native.d.ts","sourceRoot":"","sources":["../../../../src/views/NativeStackView.native.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,aAAa,EAGlB,KAAK,oBAAoB,EAG1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqB/B,OAAO,KAAK,EAEV,wBAAwB,EACxB,4BAA4B,EAE7B,MAAM,UAAU,CAAC;AAwdlB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAC3C,UAAU,EAAE,4BAA4B,CAAC;IACzC,WAAW,EAAE,wBAAwB,CAAC;CACvC,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,KAAK,qBAgGxE"}
@@ -1,36 +0,0 @@
1
- import * as React from 'react';
2
- import { Platform, View, type ViewProps } from 'react-native';
3
- // @ts-expect-error Getting private component
4
- import AppContainer from 'react-native/Libraries/ReactNative/AppContainer';
5
- import type { StackPresentationTypes } from 'react-native-screens';
6
-
7
- type ContainerProps = ViewProps & {
8
- stackPresentation: StackPresentationTypes;
9
- children: React.ReactNode;
10
- };
11
-
12
- /**
13
- * This view must *not* be flattened.
14
- * See https://github.com/software-mansion/react-native-screens/pull/1825
15
- * for detailed explanation.
16
- */
17
- export let DebugContainer = (props: ContainerProps) => {
18
- return <View {...props} collapsable={false} />;
19
- };
20
-
21
- if (process.env.NODE_ENV !== 'production') {
22
- DebugContainer = (props: ContainerProps) => {
23
- const { stackPresentation, ...rest } = props;
24
-
25
- if (Platform.OS === 'ios' && stackPresentation !== 'push') {
26
- // This is necessary for LogBox
27
- return (
28
- <AppContainer>
29
- <View {...rest} collapsable={false} />
30
- </AppContainer>
31
- );
32
- }
33
-
34
- return <View {...rest} collapsable={false} />;
35
- };
36
- }
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import { View, type ViewProps } from 'react-native';
3
- import type { StackPresentationTypes } from 'react-native-screens';
4
-
5
- type ContainerProps = ViewProps & {
6
- stackPresentation: StackPresentationTypes;
7
- children: React.ReactNode;
8
- };
9
-
10
- export function DebugContainer(props: ContainerProps) {
11
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
12
- const { stackPresentation: _, ...rest } = props;
13
- return <View {...rest} />;
14
- }