@react-navigation/native-stack 7.0.0-rc.27 → 7.0.0-rc.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/navigators/createNativeStackNavigator.js +3 -1
- package/lib/commonjs/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/views/DebugContainer.native.js +8 -10
- package/lib/commonjs/views/DebugContainer.native.js.map +1 -1
- package/lib/commonjs/views/FooterComponent.js +19 -0
- package/lib/commonjs/views/FooterComponent.js.map +1 -0
- package/lib/commonjs/views/HeaderConfig.js +24 -14
- package/lib/commonjs/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/views/NativeStackView.js +10 -7
- package/lib/commonjs/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/views/NativeStackView.native.js +56 -18
- package/lib/commonjs/views/NativeStackView.native.js.map +1 -1
- package/lib/module/navigators/createNativeStackNavigator.js +3 -1
- package/lib/module/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/views/DebugContainer.native.js +9 -11
- package/lib/module/views/DebugContainer.native.js.map +1 -1
- package/lib/module/views/FooterComponent.js +14 -0
- package/lib/module/views/FooterComponent.js.map +1 -0
- package/lib/module/views/HeaderConfig.js +24 -14
- package/lib/module/views/HeaderConfig.js.map +1 -1
- package/lib/module/views/NativeStackView.js +10 -7
- package/lib/module/views/NativeStackView.js.map +1 -1
- package/lib/module/views/NativeStackView.native.js +56 -18
- package/lib/module/views/NativeStackView.native.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +80 -18
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/views/DebugContainer.d.ts +1 -1
- package/lib/typescript/commonjs/src/views/DebugContainer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/views/DebugContainer.native.d.ts +1 -1
- package/lib/typescript/commonjs/src/views/DebugContainer.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/views/FooterComponent.d.ts +7 -0
- package/lib/typescript/commonjs/src/views/FooterComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/views/HeaderConfig.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/views/NativeStackView.d.ts +4 -3
- package/lib/typescript/commonjs/src/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/views/NativeStackView.native.d.ts +4 -3
- package/lib/typescript/commonjs/src/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +80 -18
- package/lib/typescript/module/src/types.d.ts.map +1 -1
- package/lib/typescript/module/src/views/DebugContainer.d.ts +1 -1
- package/lib/typescript/module/src/views/DebugContainer.d.ts.map +1 -1
- package/lib/typescript/module/src/views/DebugContainer.native.d.ts +1 -1
- package/lib/typescript/module/src/views/DebugContainer.native.d.ts.map +1 -1
- package/lib/typescript/module/src/views/FooterComponent.d.ts +7 -0
- package/lib/typescript/module/src/views/FooterComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/views/HeaderConfig.d.ts.map +1 -1
- package/lib/typescript/module/src/views/NativeStackView.d.ts +4 -3
- package/lib/typescript/module/src/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/module/src/views/NativeStackView.native.d.ts +4 -3
- package/lib/typescript/module/src/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/index.tsx +2 -0
- package/src/navigators/createNativeStackNavigator.tsx +2 -1
- package/src/types.tsx +74 -18
- package/src/views/DebugContainer.native.tsx +13 -6
- package/src/views/DebugContainer.tsx +1 -1
- package/src/views/FooterComponent.tsx +10 -0
- package/src/views/HeaderConfig.tsx +23 -21
- package/src/views/NativeStackView.native.tsx +81 -14
- package/src/views/NativeStackView.tsx +23 -11
|
@@ -23,6 +23,7 @@ function NativeStackNavigator({
|
|
|
23
23
|
}) {
|
|
24
24
|
const {
|
|
25
25
|
state,
|
|
26
|
+
describe,
|
|
26
27
|
descriptors,
|
|
27
28
|
navigation,
|
|
28
29
|
NavigationContent
|
|
@@ -59,7 +60,8 @@ function NativeStackNavigator({
|
|
|
59
60
|
...rest,
|
|
60
61
|
state: state,
|
|
61
62
|
navigation: navigation,
|
|
62
|
-
descriptors: descriptors
|
|
63
|
+
descriptors: descriptors,
|
|
64
|
+
describe: describe
|
|
63
65
|
})
|
|
64
66
|
});
|
|
65
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_native","require","React","_interopRequireWildcard","_NativeStackView","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","NativeStackNavigator","id","initialRouteName","children","layout","screenListeners","screenOptions","screenLayout","UNSTABLE_getStateForRouteNamesChange","rest","state","descriptors","navigation","NavigationContent","useNavigationBuilder","StackRouter","useEffect","addListener","isFocused","requestAnimationFrame","index","defaultPrevented","dispatch","StackActions","popToTop","target","key","jsx","NativeStackView","createNativeStackNavigator","config","createNavigatorFactory"],"sourceRoot":"../../../src","sources":["navigators/createNativeStackNavigator.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAcA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAQA,IAAAG,gBAAA,GAAAH,OAAA;AAA2D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,I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AAkB,CAAC,
|
|
1
|
+
{"version":3,"names":["_native","require","React","_interopRequireWildcard","_NativeStackView","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","NativeStackNavigator","id","initialRouteName","children","layout","screenListeners","screenOptions","screenLayout","UNSTABLE_getStateForRouteNamesChange","rest","state","describe","descriptors","navigation","NavigationContent","useNavigationBuilder","StackRouter","useEffect","addListener","isFocused","requestAnimationFrame","index","defaultPrevented","dispatch","StackActions","popToTop","target","key","jsx","NativeStackView","createNativeStackNavigator","config","createNavigatorFactory"],"sourceRoot":"../../../src","sources":["navigators/createNativeStackNavigator.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAcA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAQA,IAAAG,gBAAA,GAAAH,OAAA;AAA2D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CA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Q,CAAC,CAAC;UAC1BC,MAAM,EAAEhB,KAAK,CAACiB;QAChB,CAAC,CAAC;MACJ;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,EACJ,CAACd,UAAU,EAAEH,KAAK,CAACW,KAAK,EAAEX,KAAK,CAACiB,GAAG,CACrC,CAAC;EAED,oBACE,IAAAhD,WAAA,CAAAiD,GAAA,EAACd,iBAAiB;IAAAX,QAAA,eAChB,IAAAxB,WAAA,CAAAiD,GAAA,EAAClD,gBAAA,CAAAmD,eAAe;MAAA,GACVpB,IAAI;MACRC,KAAK,EAAEA,KAAM;MACbG,UAAU,EAAEA,UAAW;MACvBD,WAAW,EAAEA,WAAY;MACzBD,QAAQ,EAAEA;IAAS,CACpB;EAAC,CACe,CAAC;AAExB;AAEO,SAASmB,0BAA0BA,CAmBxCC,MAAe,EAAmC;EAClD,OAAO,IAAAC,8BAAsB,EAAChC,oBAAoB,CAAC,CAAC+B,MAAM,CAAC;AAC7D","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ exports.DebugContainer = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _AppContainer = _interopRequireDefault(require("react-native/Libraries/ReactNative/AppContainer"));
|
|
10
|
+
var _reactNativeScreens = require("react-native-screens");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -19,9 +20,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
19
20
|
* for detailed explanation.
|
|
20
21
|
*/
|
|
21
22
|
let DebugContainer = props => {
|
|
22
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
23
|
-
...props
|
|
24
|
-
collapsable: false
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeScreens.ScreenContentWrapper, {
|
|
24
|
+
...props
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
exports.DebugContainer = DebugContainer;
|
|
@@ -31,18 +31,16 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
31
31
|
stackPresentation,
|
|
32
32
|
...rest
|
|
33
33
|
} = props;
|
|
34
|
-
if (_reactNative.Platform.OS === 'ios' && stackPresentation !== 'push') {
|
|
34
|
+
if (_reactNative.Platform.OS === 'ios' && stackPresentation !== 'push' && stackPresentation !== 'formSheet') {
|
|
35
35
|
// This is necessary for LogBox
|
|
36
36
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppContainer.default, {
|
|
37
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
38
|
-
...rest
|
|
39
|
-
collapsable: false
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeScreens.ScreenContentWrapper, {
|
|
38
|
+
...rest
|
|
40
39
|
})
|
|
41
40
|
});
|
|
42
41
|
}
|
|
43
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
44
|
-
...rest
|
|
45
|
-
collapsable: false
|
|
42
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeScreens.ScreenContentWrapper, {
|
|
43
|
+
...rest
|
|
46
44
|
});
|
|
47
45
|
};
|
|
48
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_AppContainer","_interopRequireDefault","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DebugContainer","props","jsx","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_AppContainer","_interopRequireDefault","_reactNativeScreens","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DebugContainer","props","jsx","ScreenContentWrapper","exports","process","env","NODE_ENV","stackPresentation","rest","Platform","OS","children"],"sourceRoot":"../../../src","sources":["views/DebugContainer.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AAG8B,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAG,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,CAAA,SAAAG,CAAA,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List":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FooterComponent = FooterComponent;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNativeScreens = require("react-native-screens");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function FooterComponent({
|
|
12
|
+
children
|
|
13
|
+
}) {
|
|
14
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeScreens.ScreenFooter, {
|
|
15
|
+
collapsable: false,
|
|
16
|
+
children: children
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=FooterComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeScreens","_jsxRuntime","e","__esModule","default","FooterComponent","children","jsx","ScreenFooter","collapsable"],"sourceRoot":"../../../src","sources":["views/FooterComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAAoD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAM7C,SAASG,eAAeA,CAAC;EAAEC;AAAsB,CAAC,EAAE;EACzD,oBAAO,IAAAL,WAAA,CAAAM,GAAA,EAACP,mBAAA,CAAAQ,YAAY;IAACC,WAAW,EAAE,KAAM;IAAAH,QAAA,EAAEA;EAAQ,CAAe,CAAC;AACpE","ignoreList":[]}
|
|
@@ -112,7 +112,7 @@ function HeaderConfig({
|
|
|
112
112
|
* - Back button should stay visible when `headerLeft` is specified
|
|
113
113
|
* - If `headerTitle` for Android is specified, so we only need to remove the title and keep the back button
|
|
114
114
|
*/
|
|
115
|
-
const backButtonInCustomView = headerBackVisible
|
|
115
|
+
const backButtonInCustomView = headerBackVisible || _reactNative.Platform.OS === 'android' && headerTitleElement != null && headerLeftElement == null;
|
|
116
116
|
const translucent = headerBackground != null || headerTransparent ||
|
|
117
117
|
// When using a SearchBar or large title, the header needs to be translucent for it to work on iOS
|
|
118
118
|
(hasHeaderSearchBar || headerLargeTitle) && _reactNative.Platform.OS === 'ios' && headerTransparent !== false;
|
|
@@ -125,6 +125,7 @@ function HeaderConfig({
|
|
|
125
125
|
backTitleFontFamily == null && backTitleFontSize == null &&
|
|
126
126
|
// Back button menu is not disabled
|
|
127
127
|
headerBackButtonMenuEnabled !== false;
|
|
128
|
+
const isCenterViewRenderedAndroid = headerTitleAlign === 'center';
|
|
128
129
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeScreens.ScreenStackHeaderConfig, {
|
|
129
130
|
backButtonInCustomView: backButtonInCustomView,
|
|
130
131
|
backgroundColor: headerBackgroundColor,
|
|
@@ -163,16 +164,31 @@ function HeaderConfig({
|
|
|
163
164
|
children: headerTitleElement
|
|
164
165
|
}) : null]
|
|
165
166
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
166
|
-
children: [headerLeftElement != null || typeof headerTitle === 'function' ?
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
children: [headerLeftElement != null || typeof headerTitle === 'function' ?
|
|
168
|
+
/*#__PURE__*/
|
|
169
|
+
// The style passed to header left, together with title element being wrapped
|
|
170
|
+
// in flex view is reqruied for proper header layout, in particular,
|
|
171
|
+
// for the text truncation to work.
|
|
172
|
+
(0, _jsxRuntime.jsxs)(_reactNativeScreens.ScreenStackHeaderLeftView, {
|
|
173
|
+
style: !isCenterViewRenderedAndroid ? {
|
|
174
|
+
flex: 1
|
|
175
|
+
} : null,
|
|
176
|
+
children: [headerLeftElement, headerTitleAlign !== 'center' ? typeof headerTitle === 'function' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
177
|
+
style: {
|
|
178
|
+
flex: 1
|
|
179
|
+
},
|
|
180
|
+
children: headerTitleElement
|
|
181
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
182
|
+
style: {
|
|
183
|
+
flex: 1
|
|
184
|
+
},
|
|
185
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.HeaderTitle, {
|
|
170
186
|
tintColor: tintColor,
|
|
171
187
|
style: headerTitleStyleSupported,
|
|
172
188
|
children: titleText
|
|
173
|
-
})
|
|
174
|
-
})
|
|
175
|
-
}) : null,
|
|
189
|
+
})
|
|
190
|
+
}) : null]
|
|
191
|
+
}) : null, isCenterViewRenderedAndroid ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeScreens.ScreenStackHeaderCenterView, {
|
|
176
192
|
children: typeof headerTitle === 'function' ? headerTitleElement : /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.HeaderTitle, {
|
|
177
193
|
tintColor: tintColor,
|
|
178
194
|
style: headerTitleStyleSupported,
|
|
@@ -190,10 +206,4 @@ function HeaderConfig({
|
|
|
190
206
|
}) : null]
|
|
191
207
|
});
|
|
192
208
|
}
|
|
193
|
-
const styles = _reactNative.StyleSheet.create({
|
|
194
|
-
row: {
|
|
195
|
-
flexDirection: 'row',
|
|
196
|
-
alignItems: 'center'
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
209
|
//# sourceMappingURL=HeaderConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_elements","require","_native","_reactNative","_reactNativeScreens","_FontProcessor","_jsxRuntime","HeaderConfig","headerBackImageSource","headerBackButtonDisplayMode","headerBackButtonMenuEnabled","headerBackTitle","headerBackTitleStyle","headerBackVisible","headerShadowVisible","headerLargeStyle","headerLargeTitle","headerLargeTitleShadowVisible","headerLargeTitleStyle","headerBackground","headerLeft","headerRight","headerShown","headerStyle","headerBlurEffect","headerTintColor","headerTitle","headerTitleAlign","headerTitleStyle","headerTransparent","headerSearchBarOptions","headerTopInsetEnabled","route","title","canGoBack","direction","useLocale","colors","fonts","useTheme","tintColor","Platform","OS","primary","text","headerBackTitleStyleFlattened","StyleSheet","flatten","regular","headerLargeTitleStyleFlattened","select","ios","heavy","default","medium","headerTitleStyleFlattened","bold","headerStyleFlattened","headerLargeStyleFlattened","backTitleFontFamily","largeTitleFontFamily","titleFontFamily","processFonts","fontFamily","backTitleFontSize","fontSize","undefined","titleText","getHeaderTitle","name","titleColor","color","titleFontSize","titleFontWeight","fontWeight","largeTitleBackgroundColor","backgroundColor","largeTitleColor","largeTitleFontSize","largeTitleFontWeight","headerTitleStyleSupported","headerBackgroundColor","card","headerLeftElement","label","href","headerRightElement","headerTitleElement","children","supportsHeaderSearchBar","isSearchBarAvailableForCurrentPlatform","SearchBar","hasHeaderSearchBar","Error","backButtonInCustomView","translucent","isBackButtonDisplayModeAvailable","parseInt","Version","jsxs","ScreenStackHeaderConfig","backTitle","backTitleVisible","backButtonDisplayMode","blurEffect","disableBackButtonMenu","hidden","hideBackButton","hideShadow","largeTitle","largeTitleHideShadow","String","topInsetEnabled","Fragment","jsx","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","
|
|
1
|
+
{"version":3,"names":["_elements","require","_native","_reactNative","_reactNativeScreens","_FontProcessor","_jsxRuntime","HeaderConfig","headerBackImageSource","headerBackButtonDisplayMode","headerBackButtonMenuEnabled","headerBackTitle","headerBackTitleStyle","headerBackVisible","headerShadowVisible","headerLargeStyle","headerLargeTitle","headerLargeTitleShadowVisible","headerLargeTitleStyle","headerBackground","headerLeft","headerRight","headerShown","headerStyle","headerBlurEffect","headerTintColor","headerTitle","headerTitleAlign","headerTitleStyle","headerTransparent","headerSearchBarOptions","headerTopInsetEnabled","route","title","canGoBack","direction","useLocale","colors","fonts","useTheme","tintColor","Platform","OS","primary","text","headerBackTitleStyleFlattened","StyleSheet","flatten","regular","headerLargeTitleStyleFlattened","select","ios","heavy","default","medium","headerTitleStyleFlattened","bold","headerStyleFlattened","headerLargeStyleFlattened","backTitleFontFamily","largeTitleFontFamily","titleFontFamily","processFonts","fontFamily","backTitleFontSize","fontSize","undefined","titleText","getHeaderTitle","name","titleColor","color","titleFontSize","titleFontWeight","fontWeight","largeTitleBackgroundColor","backgroundColor","largeTitleColor","largeTitleFontSize","largeTitleFontWeight","headerTitleStyleSupported","headerBackgroundColor","card","headerLeftElement","label","href","headerRightElement","headerTitleElement","children","supportsHeaderSearchBar","isSearchBarAvailableForCurrentPlatform","SearchBar","hasHeaderSearchBar","Error","backButtonInCustomView","translucent","isBackButtonDisplayModeAvailable","parseInt","Version","isCenterViewRenderedAndroid","jsxs","ScreenStackHeaderConfig","backTitle","backTitleVisible","backButtonDisplayMode","blurEffect","disableBackButtonMenu","hidden","hideBackButton","hideShadow","largeTitle","largeTitleHideShadow","String","topInsetEnabled","Fragment","jsx","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","style","flex","View","HeaderTitle","ScreenStackHeaderBackButtonImage","source","ScreenStackHeaderRightView","ScreenStackHeaderSearchBarView"],"sourceRoot":"../../../src","sources":["views/HeaderConfig.tsx"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAYA,IAAAI,cAAA,GAAAJ,OAAA;AAA+C,IAAAK,WAAA,GAAAL,OAAA;AASxC,SAASM,YAAYA,CAAC;EAC3BC,qBAAqB;EACrBC,2BAA2B;EAC3BC,2BAA2B;EAC3BC,eAAe;EACfC,oBAAoB;EACpBC,iBAAiB;EACjBC,mBAAmB;EACnBC,gBAAgB;EAChBC,gBAAgB;EAChBC,6BAA6B;EAC7BC,qBAA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AAG;IAAC,CACX,CAAC,GAC/B,IAAI;EAAA,CACe,CAAC;AAE9B","ignoreList":[]}
|
|
@@ -15,7 +15,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
15
15
|
const TRANSPARENT_PRESENTATIONS = ['transparentModal', 'containedTransparentModal'];
|
|
16
16
|
function NativeStackView({
|
|
17
17
|
state,
|
|
18
|
-
descriptors
|
|
18
|
+
descriptors,
|
|
19
|
+
describe
|
|
19
20
|
}) {
|
|
20
21
|
const parentHeaderBack = React.useContext(_elements.HeaderBackContext);
|
|
21
22
|
const {
|
|
@@ -24,14 +25,15 @@ function NativeStackView({
|
|
|
24
25
|
const {
|
|
25
26
|
colors
|
|
26
27
|
} = (0, _native.useTheme)();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
const preloadedDescriptors = state.preloadedRoutes.reduce((acc, route) => {
|
|
29
|
+
acc[route.key] = acc[route.key] || describe(route, true);
|
|
30
|
+
return acc;
|
|
31
|
+
}, {});
|
|
30
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.SafeAreaProviderCompat, {
|
|
31
33
|
style: {
|
|
32
34
|
backgroundColor: colors.background
|
|
33
35
|
},
|
|
34
|
-
children: state.routes.map((route, i) => {
|
|
36
|
+
children: state.routes.concat(state.preloadedRoutes).map((route, i) => {
|
|
35
37
|
const isFocused = state.index === i;
|
|
36
38
|
const previousKey = state.routes[i - 1]?.key;
|
|
37
39
|
const nextKey = state.routes[i + 1]?.key;
|
|
@@ -41,7 +43,7 @@ function NativeStackView({
|
|
|
41
43
|
options,
|
|
42
44
|
navigation,
|
|
43
45
|
render
|
|
44
|
-
} = descriptors[route.key];
|
|
46
|
+
} = descriptors[route.key] ?? preloadedDescriptors[route.key];
|
|
45
47
|
const headerBack = previousDescriptor ? {
|
|
46
48
|
title: (0, _elements.getHeaderTitle)(previousDescriptor.options, previousDescriptor.route.name),
|
|
47
49
|
href: buildHref(previousDescriptor.route.name, previousDescriptor.route.params)
|
|
@@ -59,6 +61,7 @@ function NativeStackView({
|
|
|
59
61
|
...rest
|
|
60
62
|
} = options;
|
|
61
63
|
const nextPresentation = nextDescriptor?.options.presentation;
|
|
64
|
+
const isPreloaded = preloadedDescriptors[route.key] !== undefined && descriptors[route.key] === undefined;
|
|
62
65
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.Screen, {
|
|
63
66
|
focused: isFocused,
|
|
64
67
|
route: route,
|
|
@@ -99,7 +102,7 @@ function NativeStackView({
|
|
|
99
102
|
}) : headerLeft
|
|
100
103
|
}),
|
|
101
104
|
style: [_reactNative.StyleSheet.absoluteFill, {
|
|
102
|
-
display: isFocused || nextPresentation != null && TRANSPARENT_PRESENTATIONS.includes(nextPresentation) ? 'flex' : 'none'
|
|
105
|
+
display: (isFocused || nextPresentation != null && TRANSPARENT_PRESENTATIONS.includes(nextPresentation)) && !isPreloaded ? 'flex' : 'none'
|
|
103
106
|
}, presentation != null && TRANSPARENT_PRESENTATIONS.includes(presentation) ? {
|
|
104
107
|
backgroundColor: 'transparent'
|
|
105
108
|
} : null],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_elements","require","_native","React","_interopRequireWildcard","_reactNative","_useAnimatedHeaderHeight","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TRANSPARENT_PRESENTATIONS","NativeStackView","state","descriptors","parentHeaderBack","useContext","HeaderBackContext","buildHref","useLinkBuilder","colors","useTheme","preloadedRoutes","
|
|
1
|
+
{"version":3,"names":["_elements","require","_native","React","_interopRequireWildcard","_reactNative","_useAnimatedHeaderHeight","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TRANSPARENT_PRESENTATIONS","NativeStackView","state","descriptors","describe","parentHeaderBack","useContext","HeaderBackContext","buildHref","useLinkBuilder","colors","useTheme","preloadedDescriptors","preloadedRoutes","reduce","acc","route","key","jsx","SafeAreaProviderCompat","style","backgroundColor","background","children","routes","concat","map","isFocused","index","previousKey","nextKey","previousDescriptor","undefined","nextDescriptor","options","navigation","render","headerBack","title","getHeaderTitle","name","href","params","canGoBack","header","headerShown","headerBackImageSource","headerLeft","headerTransparent","headerBackTitle","presentation","contentStyle","rest","nextPresentation","isPreloaded","Screen","focused","back","Header","label","tintColor","HeaderBackButton","backImage","Image","source","resizeMode","styles","onPress","goBack","StyleSheet","absoluteFill","display","includes","Provider","value","AnimatedHeaderHeightProvider","View","contentContainer","headerHeight","useHeaderHeight","animatedHeaderHeight","useState","Animated","Value","useEffect","setValue","AnimatedHeaderHeightContext","create","flex","height","width","margin"],"sourceRoot":"../../../src","sources":["views/NativeStackView.tsx"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AASA,IAAAC,OAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAOA,IAAAK,wBAAA,GAAAL,OAAA;AAA+E,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAA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B,GAAGA,CAAC;EACpCpD;AAGF,CAAC,KAAK;EACJ,MAAMuD,YAAY,GAAG,IAAAC,yBAAe,EAAC,CAAC;EACtC,MAAM,CAACC,oBAAoB,CAAC,GAAGzG,KAAK,CAAC0G,QAAQ,CAC3C,MAAM,IAAIC,qBAAQ,CAACC,KAAK,CAACL,YAAY,CACvC,CAAC;EAEDvG,KAAK,CAAC6G,SAAS,CAAC,MAAM;IACpBJ,oBAAoB,CAACK,QAAQ,CAACP,YAAY,CAAC;EAC7C,CAAC,EAAE,CAACE,oBAAoB,EAAEF,YAAY,CAAC,CAAC;EAExC,oBACE,IAAAnG,WAAA,CAAAuC,GAAA,EAACxC,wBAAA,CAAA4G,2BAA2B,CAACb,QAAQ;IAACC,KAAK,EAAEM,oBAAqB;IAAAzD,QAAA,EAC/DA;EAAQ,CAC2B,CAAC;AAE3C,CAAC;AAED,MAAM2C,MAAM,GAAGG,uBAAU,CAACkB,MAAM,CAAC;EAC/BV,gBAAgB,EAAE;IAChBW,IAAI,EAAE;EACR,CAAC;EACD1B,SAAS,EAAE;IACT2B,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -17,6 +17,7 @@ var _useAnimatedHeaderHeight = require("../utils/useAnimatedHeaderHeight.js");
|
|
|
17
17
|
var _useDismissedRouteError = require("../utils/useDismissedRouteError.js");
|
|
18
18
|
var _useInvalidPreventRemoveError = require("../utils/useInvalidPreventRemoveError.js");
|
|
19
19
|
var _DebugContainer = require("./DebugContainer");
|
|
20
|
+
var _FooterComponent = require("./FooterComponent.js");
|
|
20
21
|
var _HeaderConfig = require("./HeaderConfig.js");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -29,7 +30,8 @@ const MaybeNestedStack = ({
|
|
|
29
30
|
presentation,
|
|
30
31
|
headerHeight,
|
|
31
32
|
headerTopInsetEnabled,
|
|
32
|
-
children
|
|
33
|
+
children,
|
|
34
|
+
isPreloaded
|
|
33
35
|
}) => {
|
|
34
36
|
const {
|
|
35
37
|
colors
|
|
@@ -37,7 +39,8 @@ const MaybeNestedStack = ({
|
|
|
37
39
|
const {
|
|
38
40
|
header,
|
|
39
41
|
headerShown = true,
|
|
40
|
-
contentStyle
|
|
42
|
+
contentStyle,
|
|
43
|
+
unstable_screenStyle = null
|
|
41
44
|
} = options;
|
|
42
45
|
const isHeaderInModal = _reactNative.Platform.OS === 'android' ? false : presentation !== 'card' && headerShown === true && header === undefined;
|
|
43
46
|
const headerShownPreviousRef = React.useRef(headerShown);
|
|
@@ -46,7 +49,7 @@ const MaybeNestedStack = ({
|
|
|
46
49
|
headerShownPreviousRef.current = headerShown;
|
|
47
50
|
}, [headerShown, presentation, route.name]);
|
|
48
51
|
const content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_DebugContainer.DebugContainer, {
|
|
49
|
-
style: [styles.container, presentation !== 'transparentModal' && presentation !== 'containedTransparentModal' && {
|
|
52
|
+
style: [presentation === 'formSheet' ? _reactNative.Platform.OS === 'ios' ? styles.absolute : null : styles.container, presentation !== 'transparentModal' && presentation !== 'containedTransparentModal' && {
|
|
50
53
|
backgroundColor: colors.background
|
|
51
54
|
}, contentStyle],
|
|
52
55
|
stackPresentation: presentation === 'card' ? 'push' : presentation,
|
|
@@ -59,7 +62,8 @@ const MaybeNestedStack = ({
|
|
|
59
62
|
enabled: true,
|
|
60
63
|
isNativeStack: true,
|
|
61
64
|
hasLargeHeader: options.headerLargeTitle ?? false,
|
|
62
|
-
style: _reactNative.StyleSheet.absoluteFill,
|
|
65
|
+
style: [_reactNative.StyleSheet.absoluteFill, unstable_screenStyle],
|
|
66
|
+
activityState: isPreloaded ? 0 : 2,
|
|
63
67
|
children: [content, /*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderConfig.HeaderConfig, {
|
|
64
68
|
...options,
|
|
65
69
|
route: route,
|
|
@@ -79,6 +83,7 @@ const SceneView = ({
|
|
|
79
83
|
previousDescriptor,
|
|
80
84
|
nextDescriptor,
|
|
81
85
|
isPresentationModal,
|
|
86
|
+
isPreloaded,
|
|
82
87
|
onWillDisappear,
|
|
83
88
|
onWillAppear,
|
|
84
89
|
onAppear,
|
|
@@ -86,7 +91,8 @@ const SceneView = ({
|
|
|
86
91
|
onDismissed,
|
|
87
92
|
onHeaderBackButtonClicked,
|
|
88
93
|
onNativeDismissCancelled,
|
|
89
|
-
onGestureCancel
|
|
94
|
+
onGestureCancel,
|
|
95
|
+
onSheetDetentChanged
|
|
90
96
|
}) => {
|
|
91
97
|
const {
|
|
92
98
|
route,
|
|
@@ -98,7 +104,8 @@ const SceneView = ({
|
|
|
98
104
|
animation,
|
|
99
105
|
animationMatchesGesture,
|
|
100
106
|
presentation = isPresentationModal ? 'modal' : 'card',
|
|
101
|
-
fullScreenGestureEnabled
|
|
107
|
+
fullScreenGestureEnabled,
|
|
108
|
+
unstable_screenStyle = null
|
|
102
109
|
} = options;
|
|
103
110
|
const {
|
|
104
111
|
animationDuration,
|
|
@@ -118,18 +125,28 @@ const SceneView = ({
|
|
|
118
125
|
navigationBarTranslucent,
|
|
119
126
|
navigationBarHidden,
|
|
120
127
|
orientation,
|
|
121
|
-
sheetAllowedDetents =
|
|
122
|
-
|
|
128
|
+
sheetAllowedDetents = [1.0],
|
|
129
|
+
sheetLargestUndimmedDetentIndex = -1,
|
|
123
130
|
sheetGrabberVisible = false,
|
|
124
131
|
sheetCornerRadius = -1.0,
|
|
132
|
+
sheetElevation = 24,
|
|
125
133
|
sheetExpandsWhenScrolledToEdge = true,
|
|
134
|
+
sheetInitialDetentIndex = 0,
|
|
126
135
|
statusBarAnimation,
|
|
127
136
|
statusBarHidden,
|
|
128
137
|
statusBarStyle,
|
|
129
138
|
statusBarTranslucent,
|
|
130
139
|
statusBarBackgroundColor,
|
|
140
|
+
unstable_sheetFooter = null,
|
|
131
141
|
freezeOnBlur
|
|
132
142
|
} = options;
|
|
143
|
+
|
|
144
|
+
// We want to allow only backgroundColor setting for now.
|
|
145
|
+
// This allows to workaround one issue with truncated
|
|
146
|
+
// content with formSheet presentation.
|
|
147
|
+
unstable_screenStyle = unstable_screenStyle && presentation === 'formSheet' ? {
|
|
148
|
+
backgroundColor: unstable_screenStyle.backgroundColor
|
|
149
|
+
} : null;
|
|
133
150
|
if (gestureDirection === 'vertical' && _reactNative.Platform.OS === 'ios') {
|
|
134
151
|
// for `vertical` direction to work, we need to set `fullScreenGestureEnabled` to `true`
|
|
135
152
|
// so the screen can be dismissed from any point on screen.
|
|
@@ -216,12 +233,15 @@ const SceneView = ({
|
|
|
216
233
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeScreens.Screen, {
|
|
217
234
|
enabled: true,
|
|
218
235
|
isNativeStack: true,
|
|
236
|
+
activityState: isPreloaded ? 0 : 2,
|
|
237
|
+
style: [_reactNative.StyleSheet.absoluteFill, unstable_screenStyle],
|
|
219
238
|
accessibilityElementsHidden: !focused,
|
|
220
239
|
importantForAccessibility: focused ? 'auto' : 'no-hide-descendants',
|
|
221
|
-
style: _reactNative.StyleSheet.absoluteFill,
|
|
222
240
|
hasLargeHeader: options.headerLargeTitle ?? false,
|
|
223
241
|
customAnimationOnSwipe: animationMatchesGesture,
|
|
224
242
|
fullScreenSwipeEnabled: fullScreenGestureEnabled,
|
|
243
|
+
fullScreenSwipeShadowEnabled: fullScreenGestureShadowEnabled,
|
|
244
|
+
freezeOnBlur: freezeOnBlur,
|
|
225
245
|
gestureEnabled: _reactNative.Platform.OS === 'android' ?
|
|
226
246
|
// This prop enables handling of system back gestures on Android
|
|
227
247
|
// Since we handle them in JS side, we disable this
|
|
@@ -236,9 +256,11 @@ const SceneView = ({
|
|
|
236
256
|
stackAnimation: animation,
|
|
237
257
|
screenOrientation: orientation,
|
|
238
258
|
sheetAllowedDetents: sheetAllowedDetents,
|
|
239
|
-
|
|
259
|
+
sheetLargestUndimmedDetentIndex: sheetLargestUndimmedDetentIndex,
|
|
240
260
|
sheetGrabberVisible: sheetGrabberVisible,
|
|
261
|
+
sheetInitialDetentIndex: sheetInitialDetentIndex,
|
|
241
262
|
sheetCornerRadius: sheetCornerRadius,
|
|
263
|
+
sheetElevation: sheetElevation,
|
|
242
264
|
sheetExpandsWhenScrolledToEdge: sheetExpandsWhenScrolledToEdge,
|
|
243
265
|
statusBarAnimation: statusBarAnimation,
|
|
244
266
|
statusBarHidden: statusBarHidden,
|
|
@@ -253,6 +275,7 @@ const SceneView = ({
|
|
|
253
275
|
onDisappear: onDisappear,
|
|
254
276
|
onDismissed: onDismissed,
|
|
255
277
|
onGestureCancel: onGestureCancel,
|
|
278
|
+
onSheetDetentChanged: onSheetDetentChanged,
|
|
256
279
|
gestureResponseDistance: gestureResponseDistance,
|
|
257
280
|
nativeBackButtonDismissalEnabled: false // on Android
|
|
258
281
|
,
|
|
@@ -291,14 +314,10 @@ const SceneView = ({
|
|
|
291
314
|
}
|
|
292
315
|
}
|
|
293
316
|
}
|
|
294
|
-
})
|
|
295
|
-
freezeOnBlur: freezeOnBlur
|
|
317
|
+
})
|
|
296
318
|
// When ts-expect-error is added, it affects all the props below it
|
|
297
319
|
// So we keep any props that need it at the end
|
|
298
320
|
// Otherwise invalid props may not be caught by TypeScript
|
|
299
|
-
// @ts-expect-error Props available in newer versions of `react-native-screens`
|
|
300
|
-
,
|
|
301
|
-
fullScreenSwipeShadowEnabled: fullScreenGestureShadowEnabled // 3.33.0 onwards
|
|
302
321
|
,
|
|
303
322
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_native.NavigationContext.Provider, {
|
|
304
323
|
value: navigation,
|
|
@@ -354,6 +373,8 @@ const SceneView = ({
|
|
|
354
373
|
headerBackTitle: options.headerBackTitle !== undefined ? options.headerBackTitle : undefined,
|
|
355
374
|
headerTopInsetEnabled: headerTopInsetEnabled,
|
|
356
375
|
canGoBack: headerBack !== undefined
|
|
376
|
+
}), presentation === 'formSheet' && unstable_sheetFooter && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FooterComponent.FooterComponent, {
|
|
377
|
+
children: unstable_sheetFooter()
|
|
357
378
|
})]
|
|
358
379
|
})
|
|
359
380
|
})
|
|
@@ -364,7 +385,8 @@ const SceneView = ({
|
|
|
364
385
|
function NativeStackView({
|
|
365
386
|
state,
|
|
366
387
|
navigation,
|
|
367
|
-
descriptors
|
|
388
|
+
descriptors,
|
|
389
|
+
describe
|
|
368
390
|
}) {
|
|
369
391
|
const {
|
|
370
392
|
setNextDismissedKey
|
|
@@ -374,20 +396,25 @@ function NativeStackView({
|
|
|
374
396
|
} = (0, _native.useTheme)();
|
|
375
397
|
(0, _useInvalidPreventRemoveError.useInvalidPreventRemoveError)(descriptors);
|
|
376
398
|
const modalRouteKeys = (0, _getModalRoutesKeys.getModalRouteKeys)(state.routes, descriptors);
|
|
399
|
+
const preloadedDescriptors = state.preloadedRoutes.reduce((acc, route) => {
|
|
400
|
+
acc[route.key] = acc[route.key] || describe(route, true);
|
|
401
|
+
return acc;
|
|
402
|
+
}, {});
|
|
377
403
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.SafeAreaProviderCompat, {
|
|
378
404
|
style: {
|
|
379
405
|
backgroundColor: colors.background
|
|
380
406
|
},
|
|
381
407
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeScreens.ScreenStack, {
|
|
382
408
|
style: styles.container,
|
|
383
|
-
children: state.routes.map((route, index) => {
|
|
384
|
-
const descriptor = descriptors[route.key];
|
|
409
|
+
children: state.routes.concat(state.preloadedRoutes).map((route, index) => {
|
|
410
|
+
const descriptor = descriptors[route.key] ?? preloadedDescriptors[route.key];
|
|
385
411
|
const isFocused = state.index === index;
|
|
386
412
|
const previousKey = state.routes[index - 1]?.key;
|
|
387
413
|
const nextKey = state.routes[index + 1]?.key;
|
|
388
414
|
const previousDescriptor = previousKey ? descriptors[previousKey] : undefined;
|
|
389
415
|
const nextDescriptor = nextKey ? descriptors[nextKey] : undefined;
|
|
390
416
|
const isModal = modalRouteKeys.includes(route.key);
|
|
417
|
+
const isPreloaded = preloadedDescriptors[route.key] !== undefined && descriptors[route.key] === undefined;
|
|
391
418
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SceneView, {
|
|
392
419
|
index: index,
|
|
393
420
|
focused: isFocused,
|
|
@@ -395,6 +422,7 @@ function NativeStackView({
|
|
|
395
422
|
previousDescriptor: previousDescriptor,
|
|
396
423
|
nextDescriptor: nextDescriptor,
|
|
397
424
|
isPresentationModal: isModal,
|
|
425
|
+
isPreloaded: isPreloaded,
|
|
398
426
|
onWillDisappear: () => {
|
|
399
427
|
navigation.emit({
|
|
400
428
|
type: 'transitionStart',
|
|
@@ -458,6 +486,16 @@ function NativeStackView({
|
|
|
458
486
|
type: 'gestureCancel',
|
|
459
487
|
target: route.key
|
|
460
488
|
});
|
|
489
|
+
},
|
|
490
|
+
onSheetDetentChanged: event => {
|
|
491
|
+
navigation.emit({
|
|
492
|
+
type: 'sheetDetentChange',
|
|
493
|
+
target: route.key,
|
|
494
|
+
data: {
|
|
495
|
+
index: event.nativeEvent.index,
|
|
496
|
+
stable: event.nativeEvent.isStable
|
|
497
|
+
}
|
|
498
|
+
});
|
|
461
499
|
}
|
|
462
500
|
}, route.key);
|
|
463
501
|
})
|