@react-navigation/bottom-tabs 7.6.0 → 7.7.1
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/module/unstable/NativeBottomTabView.js +6 -0
- package/lib/module/unstable/NativeBottomTabView.js.map +1 -0
- package/lib/module/unstable/NativeBottomTabView.native.js +229 -0
- package/lib/module/unstable/NativeBottomTabView.native.js.map +1 -0
- package/lib/module/unstable/NativeScreen/NativeScreen.js +166 -0
- package/lib/module/unstable/NativeScreen/NativeScreen.js.map +1 -0
- package/lib/module/unstable/NativeScreen/debounce.js +12 -0
- package/lib/module/unstable/NativeScreen/debounce.js.map +1 -0
- package/lib/module/unstable/NativeScreen/types.js +4 -0
- package/lib/module/unstable/NativeScreen/types.js.map +1 -0
- package/lib/module/unstable/NativeScreen/useAnimatedHeaderHeight.js +12 -0
- package/lib/module/unstable/NativeScreen/useAnimatedHeaderHeight.js.map +1 -0
- package/lib/module/unstable/NativeScreen/useHeaderConfig.js +283 -0
- package/lib/module/unstable/NativeScreen/useHeaderConfig.js.map +1 -0
- package/lib/module/unstable/createNativeBottomTabNavigator.js +6 -0
- package/lib/module/unstable/createNativeBottomTabNavigator.js.map +1 -0
- package/lib/module/unstable/createNativeBottomTabNavigator.native.js +65 -0
- package/lib/module/unstable/createNativeBottomTabNavigator.native.js.map +1 -0
- package/lib/module/unstable/index.js +16 -0
- package/lib/module/unstable/index.js.map +1 -0
- package/lib/module/unstable/types.js +4 -0
- package/lib/module/unstable/types.js.map +1 -0
- package/lib/typescript/src/unstable/NativeBottomTabView.d.ts +10 -0
- package/lib/typescript/src/unstable/NativeBottomTabView.d.ts.map +1 -0
- package/lib/typescript/src/unstable/NativeBottomTabView.native.d.ts +10 -0
- package/lib/typescript/src/unstable/NativeBottomTabView.native.d.ts.map +1 -0
- package/lib/typescript/src/unstable/NativeScreen/NativeScreen.d.ts +8 -0
- package/lib/typescript/src/unstable/NativeScreen/NativeScreen.d.ts.map +1 -0
- package/lib/typescript/src/unstable/NativeScreen/debounce.d.ts +2 -0
- package/lib/typescript/src/unstable/NativeScreen/debounce.d.ts.map +1 -0
- package/lib/typescript/src/unstable/NativeScreen/types.d.ts +467 -0
- package/lib/typescript/src/unstable/NativeScreen/types.d.ts.map +1 -0
- package/lib/typescript/src/unstable/NativeScreen/useAnimatedHeaderHeight.d.ts +5 -0
- package/lib/typescript/src/unstable/NativeScreen/useAnimatedHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/src/unstable/NativeScreen/useHeaderConfig.d.ts +11 -0
- package/lib/typescript/src/unstable/NativeScreen/useHeaderConfig.d.ts.map +1 -0
- package/lib/typescript/src/unstable/createNativeBottomTabNavigator.d.ts +2 -0
- package/lib/typescript/src/unstable/createNativeBottomTabNavigator.d.ts.map +1 -0
- package/lib/typescript/src/unstable/createNativeBottomTabNavigator.native.d.ts +16 -0
- package/lib/typescript/src/unstable/createNativeBottomTabNavigator.native.d.ts.map +1 -0
- package/lib/typescript/src/unstable/index.d.ts +13 -0
- package/lib/typescript/src/unstable/index.d.ts.map +1 -0
- package/lib/typescript/src/unstable/types.d.ts +302 -0
- package/lib/typescript/src/unstable/types.d.ts.map +1 -0
- package/package.json +10 -4
- package/src/unstable/NativeBottomTabView.native.tsx +307 -0
- package/src/unstable/NativeBottomTabView.tsx +20 -0
- package/src/unstable/NativeScreen/NativeScreen.tsx +242 -0
- package/src/unstable/NativeScreen/debounce.tsx +14 -0
- package/src/unstable/NativeScreen/types.ts +517 -0
- package/src/unstable/NativeScreen/useAnimatedHeaderHeight.tsx +18 -0
- package/src/unstable/NativeScreen/useHeaderConfig.tsx +423 -0
- package/src/unstable/createNativeBottomTabNavigator.native.tsx +116 -0
- package/src/unstable/createNativeBottomTabNavigator.tsx +4 -0
- package/src/unstable/index.tsx +22 -0
- package/src/unstable/types.tsx +385 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getHeaderTitle, HeaderTitle } from '@react-navigation/elements';
|
|
4
|
+
import { useLocale, useTheme } from '@react-navigation/native';
|
|
5
|
+
import Color from 'color';
|
|
6
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
7
|
+
import { isSearchBarAvailableForCurrentPlatform, ScreenStackHeaderCenterView, ScreenStackHeaderLeftView, ScreenStackHeaderRightView, ScreenStackHeaderSearchBarView, SearchBar } from 'react-native-screens';
|
|
8
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const processBarButtonItems = (items, colors, fonts) => {
|
|
10
|
+
return items?.map((item, index) => {
|
|
11
|
+
if (item.type === 'custom') {
|
|
12
|
+
// Handled with `ScreenStackHeaderLeftView` or `ScreenStackHeaderRightView`
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
if (item.type === 'spacing') {
|
|
16
|
+
if (item.spacing == null) {
|
|
17
|
+
throw new Error(`Spacing item must have a 'spacing' property defined: ${JSON.stringify(item)}`);
|
|
18
|
+
}
|
|
19
|
+
return item;
|
|
20
|
+
}
|
|
21
|
+
if (item.type === 'button' || item.type === 'menu') {
|
|
22
|
+
if (item.type === 'menu' && item.menu == null) {
|
|
23
|
+
throw new Error(`Menu item must have a 'menu' property defined: ${JSON.stringify(item)}`);
|
|
24
|
+
}
|
|
25
|
+
const {
|
|
26
|
+
badge,
|
|
27
|
+
label,
|
|
28
|
+
labelStyle,
|
|
29
|
+
icon,
|
|
30
|
+
...rest
|
|
31
|
+
} = item;
|
|
32
|
+
let processedItem = {
|
|
33
|
+
...rest,
|
|
34
|
+
index,
|
|
35
|
+
title: label,
|
|
36
|
+
titleStyle: {
|
|
37
|
+
...fonts.regular,
|
|
38
|
+
...labelStyle
|
|
39
|
+
},
|
|
40
|
+
icon: icon?.type === 'image' ? icon.tinted === false ? {
|
|
41
|
+
type: 'imageSource',
|
|
42
|
+
imageSource: icon.source
|
|
43
|
+
} : {
|
|
44
|
+
type: 'templateSource',
|
|
45
|
+
templateSource: icon.source
|
|
46
|
+
} : icon
|
|
47
|
+
};
|
|
48
|
+
if (processedItem.type === 'menu' && item.type === 'menu') {
|
|
49
|
+
processedItem = {
|
|
50
|
+
...processedItem,
|
|
51
|
+
menu: {
|
|
52
|
+
...processedItem.menu,
|
|
53
|
+
items: item.menu.items.map(getMenuItem)
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (badge) {
|
|
58
|
+
const badgeBackgroundColor = badge.style?.backgroundColor ?? colors.notification;
|
|
59
|
+
const badgeTextColor = typeof badgeBackgroundColor === 'string' && Color(badgeBackgroundColor)?.isLight() ? 'black' : 'white';
|
|
60
|
+
processedItem = {
|
|
61
|
+
...processedItem,
|
|
62
|
+
badge: {
|
|
63
|
+
...badge,
|
|
64
|
+
value: String(badge.value),
|
|
65
|
+
style: {
|
|
66
|
+
backgroundColor: badgeBackgroundColor,
|
|
67
|
+
color: badgeTextColor,
|
|
68
|
+
...fonts.regular,
|
|
69
|
+
...badge.style
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return processedItem;
|
|
75
|
+
}
|
|
76
|
+
throw new Error(`Invalid item type: ${JSON.stringify(item)}. Valid types are 'button', 'menu', 'custom' and 'spacing'.`);
|
|
77
|
+
}).filter(item => item != null);
|
|
78
|
+
};
|
|
79
|
+
const getMenuItem = item => {
|
|
80
|
+
const {
|
|
81
|
+
label,
|
|
82
|
+
...rest
|
|
83
|
+
} = item;
|
|
84
|
+
if (rest.type === 'submenu') {
|
|
85
|
+
return {
|
|
86
|
+
...rest,
|
|
87
|
+
title: label,
|
|
88
|
+
items: rest.items.map(getMenuItem)
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
...rest,
|
|
93
|
+
title: label
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export function useHeaderConfig({
|
|
97
|
+
headerShadowVisible,
|
|
98
|
+
headerLargeStyle,
|
|
99
|
+
headerLargeTitle,
|
|
100
|
+
headerLargeTitleShadowVisible,
|
|
101
|
+
headerLargeTitleStyle,
|
|
102
|
+
headerBackground,
|
|
103
|
+
headerLeft,
|
|
104
|
+
headerRight,
|
|
105
|
+
headerShown,
|
|
106
|
+
headerStyle,
|
|
107
|
+
headerBlurEffect,
|
|
108
|
+
headerTintColor,
|
|
109
|
+
headerTitle,
|
|
110
|
+
headerTitleAlign,
|
|
111
|
+
headerTitleStyle,
|
|
112
|
+
headerTransparent,
|
|
113
|
+
headerSearchBarOptions,
|
|
114
|
+
headerTopInsetEnabled,
|
|
115
|
+
route,
|
|
116
|
+
title,
|
|
117
|
+
unstable_headerLeftItems: headerLeftItems,
|
|
118
|
+
unstable_headerRightItems: headerRightItems
|
|
119
|
+
}) {
|
|
120
|
+
const {
|
|
121
|
+
direction
|
|
122
|
+
} = useLocale();
|
|
123
|
+
const {
|
|
124
|
+
colors,
|
|
125
|
+
fonts
|
|
126
|
+
} = useTheme();
|
|
127
|
+
const tintColor = headerTintColor ?? (Platform.OS === 'ios' ? colors.primary : colors.text);
|
|
128
|
+
const headerLargeTitleStyleFlattened = StyleSheet.flatten([Platform.select({
|
|
129
|
+
ios: fonts.heavy,
|
|
130
|
+
default: fonts.medium
|
|
131
|
+
}), headerLargeTitleStyle]) || {};
|
|
132
|
+
const headerTitleStyleFlattened = StyleSheet.flatten([Platform.select({
|
|
133
|
+
ios: fonts.bold,
|
|
134
|
+
default: fonts.medium
|
|
135
|
+
}), headerTitleStyle]) || {};
|
|
136
|
+
const headerStyleFlattened = StyleSheet.flatten(headerStyle) || {};
|
|
137
|
+
const headerLargeStyleFlattened = StyleSheet.flatten(headerLargeStyle) || {};
|
|
138
|
+
const titleText = getHeaderTitle({
|
|
139
|
+
title,
|
|
140
|
+
headerTitle
|
|
141
|
+
}, route.name);
|
|
142
|
+
const titleColor = 'color' in headerTitleStyleFlattened ? headerTitleStyleFlattened.color : headerTintColor ?? colors.text;
|
|
143
|
+
const titleFontSize = 'fontSize' in headerTitleStyleFlattened ? headerTitleStyleFlattened.fontSize : undefined;
|
|
144
|
+
const titleFontFamily = headerTitleStyleFlattened.fontFamily;
|
|
145
|
+
const titleFontWeight = headerTitleStyleFlattened.fontWeight;
|
|
146
|
+
const largeTitleFontFamily = headerLargeTitleStyleFlattened.fontFamily;
|
|
147
|
+
const largeTitleBackgroundColor = headerLargeStyleFlattened.backgroundColor;
|
|
148
|
+
const largeTitleColor = 'color' in headerLargeTitleStyleFlattened ? headerLargeTitleStyleFlattened.color : undefined;
|
|
149
|
+
const largeTitleFontSize = 'fontSize' in headerLargeTitleStyleFlattened ? headerLargeTitleStyleFlattened.fontSize : undefined;
|
|
150
|
+
const largeTitleFontWeight = headerLargeTitleStyleFlattened.fontWeight;
|
|
151
|
+
const headerTitleStyleSupported = {
|
|
152
|
+
color: titleColor
|
|
153
|
+
};
|
|
154
|
+
if (headerTitleStyleFlattened.fontFamily != null) {
|
|
155
|
+
headerTitleStyleSupported.fontFamily = headerTitleStyleFlattened.fontFamily;
|
|
156
|
+
}
|
|
157
|
+
if (titleFontSize != null) {
|
|
158
|
+
headerTitleStyleSupported.fontSize = titleFontSize;
|
|
159
|
+
}
|
|
160
|
+
if (titleFontWeight != null) {
|
|
161
|
+
headerTitleStyleSupported.fontWeight = titleFontWeight;
|
|
162
|
+
}
|
|
163
|
+
const headerBackgroundColor = headerStyleFlattened.backgroundColor ?? (headerBackground != null || headerTransparent ? 'transparent' : colors.card);
|
|
164
|
+
const headerLeftElement = headerLeft?.({
|
|
165
|
+
tintColor
|
|
166
|
+
});
|
|
167
|
+
const headerRightElement = headerRight?.({
|
|
168
|
+
tintColor
|
|
169
|
+
});
|
|
170
|
+
const headerTitleElement = typeof headerTitle === 'function' ? headerTitle({
|
|
171
|
+
tintColor,
|
|
172
|
+
children: titleText
|
|
173
|
+
}) : null;
|
|
174
|
+
const hasHeaderSearchBar = isSearchBarAvailableForCurrentPlatform && headerSearchBarOptions != null;
|
|
175
|
+
const translucent = headerBackground != null || headerTransparent ||
|
|
176
|
+
// When using a SearchBar or large title, the header needs to be translucent for it to work on iOS
|
|
177
|
+
(hasHeaderSearchBar || headerLargeTitle) && Platform.OS === 'ios' && headerTransparent !== false;
|
|
178
|
+
const isCenterViewRenderedAndroid = headerTitleAlign === 'center';
|
|
179
|
+
const leftItems = headerLeftItems?.({
|
|
180
|
+
tintColor
|
|
181
|
+
});
|
|
182
|
+
let rightItems = headerRightItems?.({
|
|
183
|
+
tintColor
|
|
184
|
+
});
|
|
185
|
+
if (rightItems) {
|
|
186
|
+
// iOS renders right items in reverse order
|
|
187
|
+
// So we need to reverse them here to match the order
|
|
188
|
+
rightItems = [...rightItems].reverse();
|
|
189
|
+
}
|
|
190
|
+
const children = /*#__PURE__*/_jsxs(_Fragment, {
|
|
191
|
+
children: [Platform.OS === 'ios' ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
192
|
+
children: [leftItems ? leftItems.map((item, index) => {
|
|
193
|
+
if (item.type === 'custom') {
|
|
194
|
+
return /*#__PURE__*/_jsx(ScreenStackHeaderLeftView
|
|
195
|
+
// eslint-disable-next-line @eslint-react/no-array-index-key
|
|
196
|
+
, {
|
|
197
|
+
hidesSharedBackground: item.hidesSharedBackground,
|
|
198
|
+
children: item.element
|
|
199
|
+
}, index);
|
|
200
|
+
}
|
|
201
|
+
return null;
|
|
202
|
+
}) : headerLeftElement != null ? /*#__PURE__*/_jsx(ScreenStackHeaderLeftView, {
|
|
203
|
+
children: headerLeftElement
|
|
204
|
+
}) : null, headerTitleElement != null ? /*#__PURE__*/_jsx(ScreenStackHeaderCenterView, {
|
|
205
|
+
children: headerTitleElement
|
|
206
|
+
}) : null]
|
|
207
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
208
|
+
children: [headerLeftElement != null || typeof headerTitle === 'function' ?
|
|
209
|
+
/*#__PURE__*/
|
|
210
|
+
// The style passed to header left, together with title element being wrapped
|
|
211
|
+
// in flex view is reqruied for proper header layout, in particular,
|
|
212
|
+
// for the text truncation to work.
|
|
213
|
+
_jsxs(ScreenStackHeaderLeftView, {
|
|
214
|
+
style: !isCenterViewRenderedAndroid ? {
|
|
215
|
+
flex: 1
|
|
216
|
+
} : null,
|
|
217
|
+
children: [headerLeftElement, headerTitleAlign !== 'center' ? typeof headerTitle === 'function' ? /*#__PURE__*/_jsx(View, {
|
|
218
|
+
style: {
|
|
219
|
+
flex: 1
|
|
220
|
+
},
|
|
221
|
+
children: headerTitleElement
|
|
222
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
223
|
+
style: {
|
|
224
|
+
flex: 1
|
|
225
|
+
},
|
|
226
|
+
children: /*#__PURE__*/_jsx(HeaderTitle, {
|
|
227
|
+
tintColor: tintColor,
|
|
228
|
+
style: headerTitleStyleSupported,
|
|
229
|
+
children: titleText
|
|
230
|
+
})
|
|
231
|
+
}) : null]
|
|
232
|
+
}) : null, isCenterViewRenderedAndroid ? /*#__PURE__*/_jsx(ScreenStackHeaderCenterView, {
|
|
233
|
+
children: typeof headerTitle === 'function' ? headerTitleElement : /*#__PURE__*/_jsx(HeaderTitle, {
|
|
234
|
+
tintColor: tintColor,
|
|
235
|
+
style: headerTitleStyleSupported,
|
|
236
|
+
children: titleText
|
|
237
|
+
})
|
|
238
|
+
}) : null]
|
|
239
|
+
}), Platform.OS === 'ios' && rightItems ? rightItems.map((item, index) => {
|
|
240
|
+
if (item.type === 'custom') {
|
|
241
|
+
return /*#__PURE__*/_jsx(ScreenStackHeaderRightView
|
|
242
|
+
// eslint-disable-next-line @eslint-react/no-array-index-key
|
|
243
|
+
, {
|
|
244
|
+
hidesSharedBackground: item.hidesSharedBackground,
|
|
245
|
+
children: item.element
|
|
246
|
+
}, index);
|
|
247
|
+
}
|
|
248
|
+
return null;
|
|
249
|
+
}) : headerRightElement != null ? /*#__PURE__*/_jsx(ScreenStackHeaderRightView, {
|
|
250
|
+
children: headerRightElement
|
|
251
|
+
}) : null, hasHeaderSearchBar ? /*#__PURE__*/_jsx(ScreenStackHeaderSearchBarView, {
|
|
252
|
+
children: /*#__PURE__*/_jsx(SearchBar, {
|
|
253
|
+
...headerSearchBarOptions
|
|
254
|
+
})
|
|
255
|
+
}) : null]
|
|
256
|
+
});
|
|
257
|
+
return {
|
|
258
|
+
backgroundColor: headerBackgroundColor,
|
|
259
|
+
blurEffect: headerBlurEffect,
|
|
260
|
+
color: tintColor,
|
|
261
|
+
direction,
|
|
262
|
+
hidden: headerShown === false,
|
|
263
|
+
hideShadow: headerShadowVisible === false || headerBackground != null || headerTransparent && headerShadowVisible !== true,
|
|
264
|
+
largeTitle: headerLargeTitle,
|
|
265
|
+
largeTitleBackgroundColor,
|
|
266
|
+
largeTitleColor,
|
|
267
|
+
largeTitleFontFamily,
|
|
268
|
+
largeTitleFontSize,
|
|
269
|
+
largeTitleFontWeight,
|
|
270
|
+
largeTitleHideShadow: headerLargeTitleShadowVisible === false,
|
|
271
|
+
title: titleText,
|
|
272
|
+
titleColor,
|
|
273
|
+
titleFontFamily,
|
|
274
|
+
titleFontSize,
|
|
275
|
+
titleFontWeight: String(titleFontWeight),
|
|
276
|
+
topInsetEnabled: headerTopInsetEnabled,
|
|
277
|
+
translucent: translucent === true,
|
|
278
|
+
children,
|
|
279
|
+
headerLeftBarButtonItems: processBarButtonItems(leftItems, colors, fonts),
|
|
280
|
+
headerRightBarButtonItems: processBarButtonItems(rightItems, colors, fonts)
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=useHeaderConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getHeaderTitle","HeaderTitle","useLocale","useTheme","Color","Platform","StyleSheet","View","isSearchBarAvailableForCurrentPlatform","ScreenStackHeaderCenterView","ScreenStackHeaderLeftView","ScreenStackHeaderRightView","ScreenStackHeaderSearchBarView","SearchBar","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","processBarButtonItems","items","colors","fonts","map","item","index","type","spacing","Error","JSON","stringify","menu","badge","label","labelStyle","icon","rest","processedItem","title","titleStyle","regular","tinted","imageSource","source","templateSource","getMenuItem","badgeBackgroundColor","style","backgroundColor","notification","badgeTextColor","isLight","value","String","color","filter","useHeaderConfig","headerShadowVisible","headerLargeStyle","headerLargeTitle","headerLargeTitleShadowVisible","headerLargeTitleStyle","headerBackground","headerLeft","headerRight","headerShown","headerStyle","headerBlurEffect","headerTintColor","headerTitle","headerTitleAlign","headerTitleStyle","headerTransparent","headerSearchBarOptions","headerTopInsetEnabled","route","unstable_headerLeftItems","headerLeftItems","unstable_headerRightItems","headerRightItems","direction","tintColor","OS","primary","text","headerLargeTitleStyleFlattened","flatten","select","ios","heavy","default","medium","headerTitleStyleFlattened","bold","headerStyleFlattened","headerLargeStyleFlattened","titleText","name","titleColor","titleFontSize","fontSize","undefined","titleFontFamily","fontFamily","titleFontWeight","fontWeight","largeTitleFontFamily","largeTitleBackgroundColor","largeTitleColor","largeTitleFontSize","largeTitleFontWeight","headerTitleStyleSupported","headerBackgroundColor","card","headerLeftElement","headerRightElement","headerTitleElement","children","hasHeaderSearchBar","translucent","isCenterViewRenderedAndroid","leftItems","rightItems","reverse","hidesSharedBackground","element","flex","blurEffect","hidden","hideShadow","largeTitle","largeTitleHideShadow","topInsetEnabled","headerLeftBarButtonItems","headerRightBarButtonItems"],"sourceRoot":"../../../../src","sources":["unstable/NativeScreen/useHeaderConfig.tsx"],"mappings":";;AAAA,SAASA,cAAc,EAAEC,WAAW,QAAQ,4BAA4B;AACxE,SAGEC,SAAS,EACTC,QAAQ,QACH,0BAA0B;AACjC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,UAAU,EAAkBC,IAAI,QAAQ,cAAc;AACzE,SAIEC,sCAAsC,EACtCC,2BAA2B,EAE3BC,yBAAyB,EACzBC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,SAAS,QACJ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IA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KAAK,IAAK;IACrDyE,UAAU,EAAEvE,gBAAgB;IAC5BgD,yBAAyB;IACzBC,eAAe;IACfF,oBAAoB;IACpBG,kBAAkB;IAClBC,oBAAoB;IACpBqB,oBAAoB,EAAEvE,6BAA6B,KAAK,KAAK;IAC7DtB,KAAK,EAAE0D,SAAS;IAChBE,UAAU;IACVI,eAAe;IACfH,aAAa;IACbK,eAAe,EAAEnD,MAAM,CAACmD,eAAe,CAAC;IACxC4B,eAAe,EAAE1D,qBAAqB;IACtC6C,WAAW,EAAEA,WAAW,KAAK,IAAI;IACjCF,QAAQ;IACRgB,wBAAwB,EAAElH,qBAAqB,CAACsG,SAAS,EAAEpG,MAAM,EAAEC,KAAK,CAAC;IACzEgH,yBAAyB,EAAEnH,qBAAqB,CAACuG,UAAU,EAAErG,MAAM,EAAEC,KAAK;EAC5E,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createNativeBottomTabNavigator","Error"],"sourceRoot":"../../../src","sources":["unstable/createNativeBottomTabNavigator.tsx"],"mappings":";;AAAA,OAAO,MAAMA,8BAAuH,GAClIA,CAAA,KAAM;EACJ,MAAM,IAAIC,KAAK,CAAC,wDAAwD,CAAC;AAC3E,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createNavigatorFactory, StackActions, TabRouter, useNavigationBuilder } from '@react-navigation/native';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { NativeBottomTabView } from "./NativeBottomTabView.native.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
function NativeBottomTabNavigator({
|
|
8
|
+
id,
|
|
9
|
+
initialRouteName,
|
|
10
|
+
backBehavior,
|
|
11
|
+
children,
|
|
12
|
+
layout,
|
|
13
|
+
screenListeners,
|
|
14
|
+
screenOptions,
|
|
15
|
+
screenLayout,
|
|
16
|
+
UNSTABLE_router,
|
|
17
|
+
UNSTABLE_routeNamesChangeBehavior,
|
|
18
|
+
...rest
|
|
19
|
+
}) {
|
|
20
|
+
const {
|
|
21
|
+
state,
|
|
22
|
+
navigation,
|
|
23
|
+
descriptors,
|
|
24
|
+
NavigationContent
|
|
25
|
+
} = useNavigationBuilder(TabRouter, {
|
|
26
|
+
id,
|
|
27
|
+
initialRouteName,
|
|
28
|
+
backBehavior,
|
|
29
|
+
children,
|
|
30
|
+
layout,
|
|
31
|
+
screenListeners,
|
|
32
|
+
screenOptions,
|
|
33
|
+
screenLayout,
|
|
34
|
+
UNSTABLE_router,
|
|
35
|
+
UNSTABLE_routeNamesChangeBehavior
|
|
36
|
+
});
|
|
37
|
+
const focusedRouteKey = state.routes[state.index].key;
|
|
38
|
+
const previousRouteKeyRef = React.useRef(focusedRouteKey);
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
const previousRouteKey = previousRouteKeyRef.current;
|
|
41
|
+
if (previousRouteKey !== focusedRouteKey && descriptors[previousRouteKey]?.options.popToTopOnBlur) {
|
|
42
|
+
const prevRoute = state.routes.find(route => route.key === previousRouteKey);
|
|
43
|
+
if (prevRoute?.state?.type === 'stack' && prevRoute.state.key) {
|
|
44
|
+
const popToTopAction = {
|
|
45
|
+
...StackActions.popToTop(),
|
|
46
|
+
target: prevRoute.state.key
|
|
47
|
+
};
|
|
48
|
+
navigation.dispatch(popToTopAction);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
previousRouteKeyRef.current = focusedRouteKey;
|
|
52
|
+
}, [descriptors, focusedRouteKey, navigation, state.index, state.routes]);
|
|
53
|
+
return /*#__PURE__*/_jsx(NavigationContent, {
|
|
54
|
+
children: /*#__PURE__*/_jsx(NativeBottomTabView, {
|
|
55
|
+
...rest,
|
|
56
|
+
state: state,
|
|
57
|
+
navigation: navigation,
|
|
58
|
+
descriptors: descriptors
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
export function createNativeBottomTabNavigator(config) {
|
|
63
|
+
return createNavigatorFactory(NativeBottomTabNavigator)(config);
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=createNativeBottomTabNavigator.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createNavigatorFactory","StackActions","TabRouter","useNavigationBuilder","React","NativeBottomTabView","jsx","_jsx","NativeBottomTabNavigator","id","initialRouteName","backBehavior","children","layout","screenListeners","screenOptions","screenLayout","UNSTABLE_router","UNSTABLE_routeNamesChangeBehavior","rest","state","navigation","descriptors","NavigationContent","focusedRouteKey","routes","index","key","previousRouteKeyRef","useRef","useEffect","previousRouteKey","current","options","popToTopOnBlur","prevRoute","find","route","type","popToTopAction","popToTop","target","dispatch","createNativeBottomTabNavigator","config"],"sourceRoot":"../../../src","sources":["unstable/createNativeBottomTabNavigator.native.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EAGtBC,YAAY,EAIZC,SAAS,EAGTC,oBAAoB,QACf,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,mBAAmB,QAAQ,iCAA8B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQnE,SAASC,wBAAwBA,CAAC;EAChCC,EAAE;EACFC,gBAAgB;EAChBC,YAAY;EACZC,QAAQ;EACRC,MAAM;EACNC,eAAe;EACfC,aAAa;EACbC,YAAY;EACZC,eAAe;EACfC,iCAAiC;EACjC,GAAGC;AAC0B,CAAC,EAAE;EAChC,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC,WAAW;IAAEC;EAAkB,CAAC,GACzDpB,oBAAoB,CAMlBD,SAAS,EAAE;IACXO,EAAE;IACFC,gBAAgB;IAChBC,YAAY;IACZC,QAAQ;IACRC,MAAM;IACNC,eAAe;IACfC,aAAa;IACbC,YAAY;IACZC,eAAe;IACfC;EACF,CAAC,CAAC;EAEJ,MAAMM,eAAe,GAAGJ,KAAK,CAACK,MAAM,CAACL,KAAK,CAACM,KAAK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
|
|
3
|
+
/**
|
|
4
|
+
* Navigators
|
|
5
|
+
*/
|
|
6
|
+
export { createNativeBottomTabNavigator } from './createNativeBottomTabNavigator';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Views
|
|
10
|
+
*/
|
|
11
|
+
export { NativeBottomTabView } from './NativeBottomTabView';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Types
|
|
15
|
+
*/
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createNativeBottomTabNavigator","NativeBottomTabView"],"sourceRoot":"../../../src","sources":["unstable/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,8BAA8B,QAAQ,kCAAkC;;AAEjF;AACA;AACA;AACA,SAASC,mBAAmB,QAAQ,uBAAuB;;AAE3D;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["unstable/types.tsx"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ParamListBase, type TabNavigationState } from '@react-navigation/native';
|
|
2
|
+
import type { NativeBottomTabDescriptorMap, NativeBottomTabNavigationConfig, NativeBottomTabNavigationHelpers } from './types';
|
|
3
|
+
type Props = NativeBottomTabNavigationConfig & {
|
|
4
|
+
state: TabNavigationState<ParamListBase>;
|
|
5
|
+
navigation: NativeBottomTabNavigationHelpers;
|
|
6
|
+
descriptors: NativeBottomTabDescriptorMap;
|
|
7
|
+
};
|
|
8
|
+
export declare function NativeBottomTabView(_: Props): void;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=NativeBottomTabView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeBottomTabView.d.ts","sourceRoot":"","sources":["../../../../src/unstable/NativeBottomTabView.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EACV,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,SAAS,CAAC;AAEjB,KAAK,KAAK,GAAG,+BAA+B,GAAG;IAC7C,KAAK,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACzC,UAAU,EAAE,gCAAgC,CAAC;IAC7C,WAAW,EAAE,4BAA4B,CAAC;CAC3C,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,QAE3C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ParamListBase, type TabNavigationState } from '@react-navigation/native';
|
|
2
|
+
import type { NativeBottomTabDescriptorMap, NativeBottomTabNavigationConfig, NativeBottomTabNavigationHelpers } from './types';
|
|
3
|
+
type Props = NativeBottomTabNavigationConfig & {
|
|
4
|
+
state: TabNavigationState<ParamListBase>;
|
|
5
|
+
navigation: NativeBottomTabNavigationHelpers;
|
|
6
|
+
descriptors: NativeBottomTabDescriptorMap;
|
|
7
|
+
};
|
|
8
|
+
export declare function NativeBottomTabView({ state, navigation, descriptors }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=NativeBottomTabView.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeBottomTabView.native.d.ts","sourceRoot":"","sources":["../../../../src/unstable/NativeBottomTabView.native.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,aAAa,EAGlB,KAAK,kBAAkB,EAExB,MAAM,0BAA0B,CAAC;AAYlC,OAAO,KAAK,EAEV,4BAA4B,EAC5B,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,SAAS,CAAC;AAEjB,KAAK,KAAK,GAAG,+BAA+B,GAAG;IAC7C,KAAK,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IACzC,UAAU,EAAE,gCAAgC,CAAC;IAC7C,WAAW,EAAE,4BAA4B,CAAC;CAC3C,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,KAAK,2CAuP5E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { NativeBottomTabHeaderProps } from '../types';
|
|
3
|
+
type Props = NativeBottomTabHeaderProps & {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function NativeScreen({ route, navigation, options, children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=NativeScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeScreen.d.ts","sourceRoot":"","sources":["../../../../../src/unstable/NativeScreen/NativeScreen.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAK3D,KAAK,KAAK,GAAG,0BAA0B,GAAG;IACxC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAIF,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,2CA0L3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../src/unstable/NativeScreen/debounce.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EACzD,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,MAAM,GACf,CAAC,CAUH"}
|