@react-navigation/native-stack 7.19.2 → 7.21.0

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 (31) hide show
  1. package/lib/module/navigators/createNativeStackNavigator.js +6 -9
  2. package/lib/module/navigators/createNativeStackNavigator.js.map +1 -1
  3. package/lib/module/views/NativeStackView.js +94 -74
  4. package/lib/module/views/NativeStackView.js.map +1 -1
  5. package/lib/module/views/NativeStackView.native.js +93 -93
  6. package/lib/module/views/NativeStackView.native.js.map +1 -1
  7. package/lib/module/views/useHeaderConfigProps.js +13 -3
  8. package/lib/module/views/useHeaderConfigProps.js.map +1 -1
  9. package/lib/typescript/src/navigators/createNativeStackNavigator.d.ts.map +1 -1
  10. package/lib/typescript/src/types.d.ts +38 -0
  11. package/lib/typescript/src/types.d.ts.map +1 -1
  12. package/lib/typescript/src/views/NativeStackView.d.ts.map +1 -1
  13. package/lib/typescript/src/views/NativeStackView.native.d.ts.map +1 -1
  14. package/lib/typescript/src/views/useHeaderConfigProps.d.ts +1 -1
  15. package/lib/typescript/src/views/useHeaderConfigProps.d.ts.map +1 -1
  16. package/package.json +6 -6
  17. package/src/navigators/createNativeStackNavigator.tsx +12 -11
  18. package/src/types.tsx +38 -0
  19. package/src/views/NativeStackView.native.tsx +106 -100
  20. package/src/views/NativeStackView.tsx +143 -109
  21. package/src/views/useHeaderConfigProps.tsx +31 -13
  22. package/lib/module/views/FontProcessor.js +0 -6
  23. package/lib/module/views/FontProcessor.js.map +0 -1
  24. package/lib/module/views/FontProcessor.native.js +0 -12
  25. package/lib/module/views/FontProcessor.native.js.map +0 -1
  26. package/lib/typescript/src/views/FontProcessor.d.ts +0 -2
  27. package/lib/typescript/src/views/FontProcessor.d.ts.map +0 -1
  28. package/lib/typescript/src/views/FontProcessor.native.d.ts +0 -2
  29. package/lib/typescript/src/views/FontProcessor.native.d.ts.map +0 -1
  30. package/src/views/FontProcessor.native.tsx +0 -12
  31. package/src/views/FontProcessor.tsx +0 -5
@@ -37,6 +37,7 @@ import type {
37
37
  NativeStackDescriptor,
38
38
  NativeStackDescriptorMap,
39
39
  NativeStackNavigationHelpers,
40
+ NativeStackNavigationOptions,
40
41
  } from '../types';
41
42
  import { debounce } from '../utils/debounce';
42
43
  import { getModalRouteKeys } from '../utils/getModalRoutesKeys';
@@ -57,43 +58,119 @@ type SceneViewProps = {
57
58
  shouldFreeze: boolean;
58
59
  descriptor: NativeStackDescriptor;
59
60
  previousDescriptor?: NativeStackDescriptor;
60
- nextDescriptor?: NativeStackDescriptor;
61
+ nextGestureDirection?: NativeStackNavigationOptions['gestureDirection'];
61
62
  isPresentationModal?: boolean;
62
63
  isPreloaded?: boolean;
63
- onWillDisappear: () => void;
64
- onWillAppear: () => void;
65
- onAppear: () => void;
66
- onDisappear: () => void;
67
- onDismissed: ScreenProps['onDismissed'];
68
- onHeaderBackButtonClicked: ScreenProps['onHeaderBackButtonClicked'];
69
- onNativeDismissCancelled: ScreenProps['onDismissed'];
70
- onGestureCancel: ScreenProps['onGestureCancel'];
71
- onSheetDetentChanged: ScreenProps['onSheetDetentChanged'];
64
+ stateKey: string;
65
+ emit: NativeStackNavigationHelpers['emit'];
66
+ dispatch: NativeStackNavigationHelpers['dispatch'];
67
+ getState: NativeStackNavigationHelpers['getState'];
68
+ setNextDismissedKey: (key: string) => void;
72
69
  };
73
70
 
74
71
  const useNativeDriver = Platform.OS !== 'web';
75
72
 
76
- const SceneView = ({
73
+ const SceneView = React.memo(function SceneView({
77
74
  index,
78
75
  focused,
79
76
  shouldFreeze,
80
77
  descriptor,
81
78
  previousDescriptor,
82
- nextDescriptor,
79
+ nextGestureDirection,
83
80
  isPresentationModal,
84
81
  isPreloaded,
85
- onWillDisappear,
86
- onWillAppear,
87
- onAppear,
88
- onDisappear,
89
- onDismissed,
90
- onHeaderBackButtonClicked,
91
- onNativeDismissCancelled,
92
- onGestureCancel,
93
- onSheetDetentChanged,
94
- }: SceneViewProps) => {
82
+ stateKey,
83
+ emit,
84
+ dispatch,
85
+ getState,
86
+ setNextDismissedKey,
87
+ }: SceneViewProps) {
95
88
  const { route, navigation, options, render } = descriptor;
96
89
 
90
+ const onWillDisappear = () => {
91
+ emit({
92
+ type: 'transitionStart',
93
+ data: { closing: true },
94
+ target: route.key,
95
+ });
96
+ };
97
+
98
+ const onWillAppear = () => {
99
+ emit({
100
+ type: 'transitionStart',
101
+ data: { closing: false },
102
+ target: route.key,
103
+ });
104
+ };
105
+
106
+ const onAppear = () => {
107
+ emit({
108
+ type: 'transitionEnd',
109
+ data: { closing: false },
110
+ target: route.key,
111
+ });
112
+ };
113
+
114
+ const onDisappear = () => {
115
+ emit({
116
+ type: 'transitionEnd',
117
+ data: { closing: true },
118
+ target: route.key,
119
+ });
120
+ };
121
+
122
+ const onDismissed: ScreenProps['onDismissed'] = (event) => {
123
+ const currentState = getState();
124
+ const currentActiveRoutes = currentState.routes.slice(
125
+ 0,
126
+ currentState.index + 1
127
+ );
128
+
129
+ if (currentActiveRoutes.some((r) => r.key === route.key)) {
130
+ dispatch({
131
+ ...StackActions.pop(event.nativeEvent.dismissCount),
132
+ source: route.key,
133
+ target: currentState.key,
134
+ });
135
+ }
136
+
137
+ setNextDismissedKey(route.key);
138
+ };
139
+
140
+ const onHeaderBackButtonClicked = () => {
141
+ dispatch({
142
+ ...StackActions.pop(),
143
+ source: route.key,
144
+ target: stateKey,
145
+ });
146
+ };
147
+
148
+ const onNativeDismissCancelled: ScreenProps['onDismissed'] = (event) => {
149
+ dispatch({
150
+ ...StackActions.pop(event.nativeEvent.dismissCount),
151
+ source: route.key,
152
+ target: stateKey,
153
+ });
154
+ };
155
+
156
+ const onGestureCancel = () => {
157
+ emit({
158
+ type: 'gestureCancel',
159
+ target: route.key,
160
+ });
161
+ };
162
+
163
+ const onSheetDetentChanged: ScreenProps['onSheetDetentChanged'] = (event) => {
164
+ emit({
165
+ type: 'sheetDetentChange',
166
+ target: route.key,
167
+ data: {
168
+ index: event.nativeEvent.index,
169
+ stable: event.nativeEvent.isStable,
170
+ },
171
+ });
172
+ };
173
+
97
174
  let {
98
175
  animation,
99
176
  animationMatchesGesture,
@@ -161,7 +238,6 @@ const SceneView = ({
161
238
 
162
239
  // workaround for rn-screens where gestureDirection has to be set on both
163
240
  // current and previous screen - software-mansion/react-native-screens/pull/1509
164
- const nextGestureDirection = nextDescriptor?.options.gestureDirection;
165
241
  const gestureDirectionOverride =
166
242
  nextGestureDirection != null ? nextGestureDirection : gestureDirection;
167
243
 
@@ -497,7 +573,7 @@ const SceneView = ({
497
573
  </ScreenStackItem>
498
574
  </NavigationProvider>
499
575
  );
500
- };
576
+ });
501
577
 
502
578
  type Props = {
503
579
  state: StackNavigationState<ParamListBase>;
@@ -563,84 +639,14 @@ export function NativeStackView({
563
639
  shouldFreeze={shouldFreeze}
564
640
  descriptor={descriptor}
565
641
  previousDescriptor={previousDescriptor}
566
- nextDescriptor={nextDescriptor}
642
+ nextGestureDirection={nextDescriptor?.options.gestureDirection}
567
643
  isPresentationModal={isModal}
568
644
  isPreloaded={isPreloaded}
569
- onWillDisappear={() => {
570
- navigation.emit({
571
- type: 'transitionStart',
572
- data: { closing: true },
573
- target: route.key,
574
- });
575
- }}
576
- onWillAppear={() => {
577
- navigation.emit({
578
- type: 'transitionStart',
579
- data: { closing: false },
580
- target: route.key,
581
- });
582
- }}
583
- onAppear={() => {
584
- navigation.emit({
585
- type: 'transitionEnd',
586
- data: { closing: false },
587
- target: route.key,
588
- });
589
- }}
590
- onDisappear={() => {
591
- navigation.emit({
592
- type: 'transitionEnd',
593
- data: { closing: true },
594
- target: route.key,
595
- });
596
- }}
597
- onDismissed={(event) => {
598
- const currentState = navigation.getState();
599
- const currentActiveRoutes = currentState.routes.slice(
600
- 0,
601
- currentState.index + 1
602
- );
603
-
604
- if (currentActiveRoutes.some((r) => r.key === route.key)) {
605
- navigation.dispatch({
606
- ...StackActions.pop(event.nativeEvent.dismissCount),
607
- source: route.key,
608
- target: currentState.key,
609
- });
610
- }
611
-
612
- setNextDismissedKey(route.key);
613
- }}
614
- onHeaderBackButtonClicked={() => {
615
- navigation.dispatch({
616
- ...StackActions.pop(),
617
- source: route.key,
618
- target: state.key,
619
- });
620
- }}
621
- onNativeDismissCancelled={(event) => {
622
- navigation.dispatch({
623
- ...StackActions.pop(event.nativeEvent.dismissCount),
624
- source: route.key,
625
- target: state.key,
626
- });
627
- }}
628
- onGestureCancel={() => {
629
- navigation.emit({
630
- type: 'gestureCancel',
631
- target: route.key,
632
- });
633
- }}
634
- onSheetDetentChanged={(event) => {
635
- navigation.emit({
636
- type: 'sheetDetentChange',
637
- target: route.key,
638
- data: {
639
- index: event.nativeEvent.index,
640
- stable: event.nativeEvent.isStable,
641
- },
642
- });
643
- }}
645
+ stateKey={state.key}
646
+ emit={navigation.emit}
647
+ dispatch={navigation.dispatch}
648
+ getState={navigation.getState}
649
+ setNextDismissedKey={setNextDismissedKey}
644
650
  />
645
651
  );
646
652
  })}
@@ -8,6 +8,7 @@ import {
8
8
  useHeaderHeight,
9
9
  } from '@react-navigation/elements';
10
10
  import {
11
+ type NavigationRoute,
11
12
  type ParamListBase,
12
13
  type RouteProp,
13
14
  type StackNavigationState,
@@ -59,37 +60,9 @@ export function NativeStackView({ state, descriptors, describe }: Props) {
59
60
  ? descriptors[previousKey]
60
61
  : undefined;
61
62
  const nextDescriptor = nextKey ? descriptors[nextKey] : undefined;
62
- const { options, navigation, render } =
63
+ const descriptor =
63
64
  descriptors[route.key] ?? preloadedDescriptors[route.key];
64
65
 
65
- const headerBack = previousDescriptor
66
- ? {
67
- title: getHeaderTitle(
68
- previousDescriptor.options,
69
- previousDescriptor.route.name
70
- ),
71
- href: buildHref(
72
- previousDescriptor.route.name,
73
- previousDescriptor.route.params
74
- ),
75
- }
76
- : parentHeaderBack;
77
-
78
- const canGoBack = headerBack != null;
79
-
80
- const {
81
- header,
82
- headerShown,
83
- headerBackIcon,
84
- headerBackImageSource,
85
- headerLeft,
86
- headerTransparent,
87
- headerBackTitle,
88
- presentation,
89
- contentStyle,
90
- ...rest
91
- } = options;
92
-
93
66
  const nextPresentation = nextDescriptor?.options.presentation;
94
67
 
95
68
  const isPreloaded =
@@ -97,95 +70,156 @@ export function NativeStackView({ state, descriptors, describe }: Props) {
97
70
  descriptors[route.key] === undefined;
98
71
 
99
72
  return (
100
- <Screen
73
+ <SceneView
101
74
  key={route.key}
102
- focused={isFocused}
103
75
  route={route}
104
- navigation={navigation}
105
- headerShown={headerShown}
106
- headerTransparent={headerTransparent}
107
- header={
108
- header !== undefined ? (
109
- header({
110
- back: headerBack,
111
- options,
112
- route,
113
- navigation,
114
- })
115
- ) : (
116
- <Header
117
- {...rest}
118
- back={headerBack}
119
- title={getHeaderTitle(options, route.name)}
120
- headerLeft={
121
- typeof headerLeft === 'function'
122
- ? ({ label, ...rest }) =>
123
- headerLeft({
124
- ...rest,
125
- label: headerBackTitle ?? label,
126
- })
127
- : headerLeft === undefined && canGoBack
128
- ? ({ tintColor, label, ...rest }) => (
129
- <HeaderBackButton
130
- {...rest}
131
- label={headerBackTitle ?? label}
132
- tintColor={tintColor}
133
- backImage={
134
- headerBackIcon !== undefined ||
135
- headerBackImageSource !== undefined
136
- ? () => (
137
- <Image
138
- source={
139
- headerBackIcon?.source ??
140
- headerBackImageSource
141
- }
142
- resizeMode="contain"
143
- tintColor={tintColor}
144
- style={styles.backImage}
145
- />
146
- )
147
- : undefined
148
- }
149
- onPress={navigation.goBack}
150
- />
151
- )
152
- : headerLeft
153
- }
154
- headerTransparent={headerTransparent}
155
- />
156
- )
76
+ descriptor={descriptor}
77
+ previousDescriptor={previousDescriptor}
78
+ parentHeaderBack={parentHeaderBack}
79
+ buildHref={buildHref}
80
+ focused={isFocused}
81
+ visible={
82
+ (isFocused ||
83
+ (nextPresentation != null &&
84
+ TRANSPARENT_PRESENTATIONS.includes(nextPresentation))) &&
85
+ !isPreloaded
157
86
  }
158
- style={[
159
- StyleSheet.absoluteFill,
160
- {
161
- display:
162
- (isFocused ||
163
- (nextPresentation != null &&
164
- TRANSPARENT_PRESENTATIONS.includes(nextPresentation))) &&
165
- !isPreloaded
166
- ? 'flex'
167
- : 'none',
168
- },
169
- presentation != null &&
170
- TRANSPARENT_PRESENTATIONS.includes(presentation)
171
- ? { backgroundColor: 'transparent' }
172
- : null,
173
- ]}
174
- >
175
- <HeaderBackContext.Provider value={headerBack}>
176
- <AnimatedHeaderHeightProvider>
177
- <View style={[styles.contentContainer, contentStyle]}>
178
- {render()}
179
- </View>
180
- </AnimatedHeaderHeightProvider>
181
- </HeaderBackContext.Provider>
182
- </Screen>
87
+ />
183
88
  );
184
89
  })}
185
90
  </SafeAreaProviderCompat>
186
91
  );
187
92
  }
188
93
 
94
+ type SceneViewProps = {
95
+ route: NavigationRoute<ParamListBase, string>;
96
+ descriptor: NativeStackDescriptor;
97
+ previousDescriptor: NativeStackDescriptor | undefined;
98
+ parentHeaderBack: React.ContextType<typeof HeaderBackContext>;
99
+ buildHref: ReturnType<typeof useLinkBuilder>['buildHref'];
100
+ focused: boolean;
101
+ visible: boolean;
102
+ };
103
+
104
+ const SceneView = React.memo(function SceneView({
105
+ route,
106
+ descriptor,
107
+ previousDescriptor,
108
+ parentHeaderBack,
109
+ buildHref,
110
+ focused,
111
+ visible,
112
+ }: SceneViewProps) {
113
+ const { options, navigation, render } = descriptor;
114
+
115
+ const headerBack = previousDescriptor
116
+ ? {
117
+ title: getHeaderTitle(
118
+ previousDescriptor.options,
119
+ previousDescriptor.route.name
120
+ ),
121
+ href: buildHref(
122
+ previousDescriptor.route.name,
123
+ previousDescriptor.route.params
124
+ ),
125
+ }
126
+ : parentHeaderBack;
127
+
128
+ const canGoBack = headerBack != null;
129
+
130
+ const {
131
+ header,
132
+ headerShown,
133
+ headerBackIcon,
134
+ headerBackImageSource,
135
+ headerLeft,
136
+ headerTransparent,
137
+ headerBackTitle,
138
+ presentation,
139
+ contentStyle,
140
+ ...rest
141
+ } = options;
142
+
143
+ return (
144
+ <Screen
145
+ key={route.key}
146
+ focused={focused}
147
+ route={route}
148
+ navigation={navigation}
149
+ headerShown={headerShown}
150
+ headerTransparent={headerTransparent}
151
+ header={
152
+ header !== undefined ? (
153
+ header({
154
+ back: headerBack,
155
+ options,
156
+ route,
157
+ navigation,
158
+ })
159
+ ) : (
160
+ <Header
161
+ {...rest}
162
+ back={headerBack}
163
+ title={getHeaderTitle(options, route.name)}
164
+ headerLeft={
165
+ typeof headerLeft === 'function'
166
+ ? ({ label, ...rest }) =>
167
+ headerLeft({
168
+ ...rest,
169
+ label: headerBackTitle ?? label,
170
+ })
171
+ : headerLeft === undefined && canGoBack
172
+ ? ({ tintColor, label, ...rest }) => (
173
+ <HeaderBackButton
174
+ {...rest}
175
+ label={headerBackTitle ?? label}
176
+ tintColor={tintColor}
177
+ backImage={
178
+ headerBackIcon !== undefined ||
179
+ headerBackImageSource !== undefined
180
+ ? () => (
181
+ <Image
182
+ source={
183
+ headerBackIcon?.source ??
184
+ headerBackImageSource
185
+ }
186
+ resizeMode="contain"
187
+ tintColor={tintColor}
188
+ style={styles.backImage}
189
+ />
190
+ )
191
+ : undefined
192
+ }
193
+ onPress={navigation.goBack}
194
+ />
195
+ )
196
+ : headerLeft
197
+ }
198
+ headerTransparent={headerTransparent}
199
+ />
200
+ )
201
+ }
202
+ style={[
203
+ StyleSheet.absoluteFill,
204
+ {
205
+ display: visible ? 'flex' : 'none',
206
+ },
207
+ presentation != null && TRANSPARENT_PRESENTATIONS.includes(presentation)
208
+ ? { backgroundColor: 'transparent' }
209
+ : null,
210
+ ]}
211
+ >
212
+ <HeaderBackContext.Provider value={headerBack}>
213
+ <AnimatedHeaderHeightProvider>
214
+ <View style={[styles.contentContainer, contentStyle]}>
215
+ {render()}
216
+ </View>
217
+ </AnimatedHeaderHeightProvider>
218
+ </HeaderBackContext.Provider>
219
+ </Screen>
220
+ );
221
+ });
222
+
189
223
  const AnimatedHeaderHeightProvider = ({
190
224
  children,
191
225
  }: {
@@ -10,6 +10,7 @@ import { Platform, StyleSheet, type TextStyle, View } from 'react-native';
10
10
  import {
11
11
  type HeaderBarButtonItemMenuAction,
12
12
  type HeaderBarButtonItemSubmenu,
13
+ type HeaderBarButtonItemVisibilityPriority,
13
14
  type HeaderBarButtonItemWithAction,
14
15
  type HeaderBarButtonItemWithMenu,
15
16
  isSearchBarAvailableForCurrentPlatform,
@@ -29,7 +30,6 @@ import type {
29
30
  NativeStackHeaderItemMenuSubmenu,
30
31
  NativeStackNavigationOptions,
31
32
  } from '../types';
32
- import { processFonts } from './FontProcessor';
33
33
 
34
34
  type Props = NativeStackNavigationOptions & {
35
35
  headerTopInsetEnabled: boolean;
@@ -71,7 +71,13 @@ const processBarButtonItems = (
71
71
  );
72
72
  }
73
73
 
74
- const { badge, label, labelStyle, icon, ...rest } = item;
74
+ const { badge, label, labelStyle, icon, visibilityPriority, ...rest } =
75
+ item;
76
+
77
+ const processedVisibilityPriority:
78
+ | HeaderBarButtonItemVisibilityPriority
79
+ | undefined =
80
+ visibilityPriority === 'default' ? 'standard' : visibilityPriority;
75
81
 
76
82
  const processedItemCommon = {
77
83
  ...rest,
@@ -82,6 +88,7 @@ const processBarButtonItems = (
82
88
  ...labelStyle,
83
89
  },
84
90
  icon: transformIcon(icon),
91
+ visibilityPriority: processedVisibilityPriority,
85
92
  };
86
93
 
87
94
  let processedItem:
@@ -164,13 +171,22 @@ const getMenuItem = (
164
171
  item: NativeStackHeaderItemMenuAction | NativeStackHeaderItemMenuSubmenu
165
172
  ): HeaderBarButtonItemMenuAction | HeaderBarButtonItemSubmenu => {
166
173
  if (item.type === 'submenu') {
167
- const { label, icon, inline, layout, items, multiselectable, ...rest } =
168
- item;
174
+ const {
175
+ label,
176
+ description,
177
+ icon,
178
+ inline,
179
+ layout,
180
+ items,
181
+ multiselectable,
182
+ ...rest
183
+ } = item;
169
184
 
170
185
  return {
171
186
  ...rest,
172
187
  icon: transformIcon(icon),
173
188
  title: label,
189
+ subtitle: description,
174
190
  displayAsPalette: layout === 'palette',
175
191
  displayInline: inline,
176
192
  singleSelection:
@@ -205,7 +221,9 @@ export function useHeaderConfigProps({
205
221
  headerLargeTitleStyle,
206
222
  headerBackground,
207
223
  headerLeft,
224
+ headerLeftBackgroundVisible,
208
225
  headerRight,
226
+ headerRightBackgroundVisible,
209
227
  headerShown,
210
228
  headerStyle,
211
229
  headerBlurEffect,
@@ -253,17 +271,11 @@ export function useHeaderConfigProps({
253
271
  ? 'transparent'
254
272
  : colors.card);
255
273
 
256
- const [backTitleFontFamily, largeTitleFontFamily, titleFontFamily] =
257
- processFonts([
258
- headerBackTitleStyleFlattened.fontFamily,
259
- headerLargeTitleStyleFlattened.fontFamily,
260
- headerTitleStyleFlattened.fontFamily,
261
- ]);
262
-
263
274
  const backTitleFontSize =
264
275
  'fontSize' in headerBackTitleStyleFlattened
265
276
  ? headerBackTitleStyleFlattened.fontSize
266
277
  : undefined;
278
+ const backTitleFontFamily = headerBackTitleStyleFlattened.fontFamily;
267
279
 
268
280
  const titleText = getHeaderTitle({ title, headerTitle }, route.name);
269
281
  const titleColor =
@@ -281,6 +293,7 @@ export function useHeaderConfigProps({
281
293
  ? headerTitleStyleFlattened.fontSize
282
294
  : undefined;
283
295
  const titleFontWeight = headerTitleStyleFlattened.fontWeight;
296
+ const titleFontFamily = headerTitleStyleFlattened.fontFamily;
284
297
 
285
298
  const largeTitleBackgroundColor = headerLargeStyleFlattened.backgroundColor;
286
299
  const largeTitleColor =
@@ -292,6 +305,7 @@ export function useHeaderConfigProps({
292
305
  ? headerLargeTitleStyleFlattened.fontSize
293
306
  : undefined;
294
307
  const largeTitleFontWeight = headerLargeTitleStyleFlattened.fontWeight;
308
+ const largeTitleFontFamily = headerLargeTitleStyleFlattened.fontFamily;
295
309
 
296
310
  const headerTitleStyleSupported: TextStyle = { color: titleColor };
297
311
 
@@ -407,7 +421,9 @@ export function useHeaderConfigProps({
407
421
  return null;
408
422
  })
409
423
  ) : headerLeftElement != null ? (
410
- <ScreenStackHeaderLeftView>
424
+ <ScreenStackHeaderLeftView
425
+ hidesSharedBackground={headerLeftBackgroundVisible === false}
426
+ >
411
427
  {headerLeftElement}
412
428
  </ScreenStackHeaderLeftView>
413
429
  ) : null}
@@ -481,7 +497,9 @@ export function useHeaderConfigProps({
481
497
  return null;
482
498
  })
483
499
  ) : headerRightElement != null ? (
484
- <ScreenStackHeaderRightView>
500
+ <ScreenStackHeaderRightView
501
+ hidesSharedBackground={headerRightBackgroundVisible === false}
502
+ >
485
503
  {headerRightElement}
486
504
  </ScreenStackHeaderRightView>
487
505
  ) : null}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- export function processFonts(_) {
4
- throw new Error('Not supported on Web');
5
- }
6
- //# sourceMappingURL=FontProcessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["processFonts","_","Error"],"sourceRoot":"../../../src","sources":["views/FontProcessor.tsx"],"mappings":";;AAAA,OAAO,SAASA,YAAYA,CAC1BC,CAAyB,EACD;EACxB,MAAM,IAAIC,KAAK,CAAC,sBAAsB,CAAC;AACzC","ignoreList":[]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- // @ts-expect-error importing private module
4
- import ReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';
5
- export function processFonts(fontFamilies) {
6
- const fontFamilyProcessor = ReactNativeStyleAttributes.fontFamily?.process;
7
- if (typeof fontFamilyProcessor === 'function') {
8
- return fontFamilies.map(fontFamilyProcessor);
9
- }
10
- return fontFamilies;
11
- }
12
- //# sourceMappingURL=FontProcessor.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["ReactNativeStyleAttributes","processFonts","fontFamilies","fontFamilyProcessor","fontFamily","process","map"],"sourceRoot":"../../../src","sources":["views/FontProcessor.native.tsx"],"mappings":";;AAAA;AACA,OAAOA,0BAA0B,MAAM,mEAAmE;AAE1G,OAAO,SAASC,YAAYA,CAC1BC,YAAoC,EACZ;EACxB,MAAMC,mBAAmB,GAAGH,0BAA0B,CAACI,UAAU,EAAEC,OAAO;EAC1E,IAAI,OAAOF,mBAAmB,KAAK,UAAU,EAAE;IAC7C,OAAOD,YAAY,CAACI,GAAG,CAACH,mBAAmB,CAAC;EAC9C;EACA,OAAOD,YAAY;AACrB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export declare function processFonts(_: (string | undefined)[]): (string | undefined)[];
2
- //# sourceMappingURL=FontProcessor.d.ts.map