@react-native-ohos/react-native-tab-view 4.0.11-rc.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.
Files changed (86) hide show
  1. package/LICENSE +21 -0
  2. package/README.OpenSource +11 -0
  3. package/README.md +9 -0
  4. package/lib/module/Pager.android.js +4 -0
  5. package/lib/module/Pager.android.js.map +1 -0
  6. package/lib/module/Pager.ios.js +4 -0
  7. package/lib/module/Pager.ios.js.map +1 -0
  8. package/lib/module/Pager.js +4 -0
  9. package/lib/module/Pager.js.map +1 -0
  10. package/lib/module/PagerViewAdapter.js +126 -0
  11. package/lib/module/PagerViewAdapter.js.map +1 -0
  12. package/lib/module/PanResponderAdapter.js +200 -0
  13. package/lib/module/PanResponderAdapter.js.map +1 -0
  14. package/lib/module/PlatformPressable.js +59 -0
  15. package/lib/module/PlatformPressable.js.map +1 -0
  16. package/lib/module/SceneMap.js +24 -0
  17. package/lib/module/SceneMap.js.map +1 -0
  18. package/lib/module/SceneView.js +73 -0
  19. package/lib/module/SceneView.js.map +1 -0
  20. package/lib/module/TabBar.js +472 -0
  21. package/lib/module/TabBar.js.map +1 -0
  22. package/lib/module/TabBarIndicator.js +122 -0
  23. package/lib/module/TabBarIndicator.js.map +1 -0
  24. package/lib/module/TabBarItem.js +218 -0
  25. package/lib/module/TabBarItem.js.map +1 -0
  26. package/lib/module/TabBarItemLabel.js +33 -0
  27. package/lib/module/TabBarItemLabel.js.map +1 -0
  28. package/lib/module/TabView.js +140 -0
  29. package/lib/module/TabView.js.map +1 -0
  30. package/lib/module/index.js +8 -0
  31. package/lib/module/index.js.map +1 -0
  32. package/lib/module/package.json +1 -0
  33. package/lib/module/types.js +4 -0
  34. package/lib/module/types.js.map +1 -0
  35. package/lib/module/useAnimatedValue.js +12 -0
  36. package/lib/module/useAnimatedValue.js.map +1 -0
  37. package/lib/typescript/package.json +1 -0
  38. package/lib/typescript/src/Pager.android.d.ts +2 -0
  39. package/lib/typescript/src/Pager.android.d.ts.map +1 -0
  40. package/lib/typescript/src/Pager.d.ts +2 -0
  41. package/lib/typescript/src/Pager.d.ts.map +1 -0
  42. package/lib/typescript/src/Pager.ios.d.ts +2 -0
  43. package/lib/typescript/src/Pager.ios.d.ts.map +1 -0
  44. package/lib/typescript/src/PagerViewAdapter.d.ts +15 -0
  45. package/lib/typescript/src/PagerViewAdapter.d.ts.map +1 -0
  46. package/lib/typescript/src/PanResponderAdapter.d.ts +16 -0
  47. package/lib/typescript/src/PanResponderAdapter.d.ts.map +1 -0
  48. package/lib/typescript/src/PlatformPressable.d.ts +13 -0
  49. package/lib/typescript/src/PlatformPressable.d.ts.map +1 -0
  50. package/lib/typescript/src/SceneMap.d.ts +10 -0
  51. package/lib/typescript/src/SceneMap.d.ts.map +1 -0
  52. package/lib/typescript/src/SceneView.d.ts +16 -0
  53. package/lib/typescript/src/SceneView.d.ts.map +1 -0
  54. package/lib/typescript/src/TabBar.d.ts +32 -0
  55. package/lib/typescript/src/TabBar.d.ts.map +1 -0
  56. package/lib/typescript/src/TabBarIndicator.d.ts +15 -0
  57. package/lib/typescript/src/TabBarIndicator.d.ts.map +1 -0
  58. package/lib/typescript/src/TabBarItem.d.ts +19 -0
  59. package/lib/typescript/src/TabBarItem.d.ts.map +1 -0
  60. package/lib/typescript/src/TabBarItemLabel.d.ts +11 -0
  61. package/lib/typescript/src/TabBarItemLabel.d.ts.map +1 -0
  62. package/lib/typescript/src/TabView.d.ts +30 -0
  63. package/lib/typescript/src/TabView.d.ts.map +1 -0
  64. package/lib/typescript/src/index.d.ts +11 -0
  65. package/lib/typescript/src/index.d.ts.map +1 -0
  66. package/lib/typescript/src/types.d.ts +70 -0
  67. package/lib/typescript/src/types.d.ts.map +1 -0
  68. package/lib/typescript/src/useAnimatedValue.d.ts +3 -0
  69. package/lib/typescript/src/useAnimatedValue.d.ts.map +1 -0
  70. package/package.json +79 -0
  71. package/src/Pager.android.tsx +1 -0
  72. package/src/Pager.ios.tsx +1 -0
  73. package/src/Pager.tsx +1 -0
  74. package/src/PagerViewAdapter.tsx +182 -0
  75. package/src/PanResponderAdapter.tsx +339 -0
  76. package/src/PlatformPressable.tsx +75 -0
  77. package/src/SceneMap.tsx +30 -0
  78. package/src/SceneView.tsx +107 -0
  79. package/src/TabBar.tsx +729 -0
  80. package/src/TabBarIndicator.tsx +190 -0
  81. package/src/TabBarItem.tsx +305 -0
  82. package/src/TabBarItemLabel.tsx +42 -0
  83. package/src/TabView.tsx +195 -0
  84. package/src/index.tsx +15 -0
  85. package/src/types.tsx +87 -0
  86. package/src/useAnimatedValue.tsx +12 -0
@@ -0,0 +1,218 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Animated, Platform, StyleSheet, View } from 'react-native';
5
+ import useLatestCallback from 'use-latest-callback';
6
+ import { PlatformPressable } from "./PlatformPressable.js";
7
+ import { TabBarItemLabel } from "./TabBarItemLabel.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ const DEFAULT_ACTIVE_COLOR = 'rgba(255, 255, 255, 1)';
10
+ const DEFAULT_INACTIVE_COLOR = 'rgba(255, 255, 255, 0.7)';
11
+ const ICON_SIZE = 24;
12
+ const getActiveOpacity = (position, routesLength, tabIndex) => {
13
+ if (routesLength > 1) {
14
+ const inputRange = Array.from({
15
+ length: routesLength
16
+ }, (_, i) => i);
17
+ return position.interpolate({
18
+ inputRange,
19
+ outputRange: inputRange.map(i => i === tabIndex ? 1 : 0)
20
+ });
21
+ } else {
22
+ return 1;
23
+ }
24
+ };
25
+ const getInactiveOpacity = (position, routesLength, tabIndex) => {
26
+ if (routesLength > 1) {
27
+ const inputRange = Array.from({
28
+ length: routesLength
29
+ }, (_, i) => i);
30
+ return position.interpolate({
31
+ inputRange,
32
+ outputRange: inputRange.map(i => i === tabIndex ? 0 : 1)
33
+ });
34
+ } else {
35
+ return 0;
36
+ }
37
+ };
38
+ const ANDROID_RIPPLE_DEFAULT = {
39
+ borderless: true
40
+ };
41
+ const TabBarItemInternal = ({
42
+ accessibilityLabel,
43
+ accessible,
44
+ label: customlabel,
45
+ testID,
46
+ onLongPress,
47
+ onPress,
48
+ isFocused,
49
+ position,
50
+ style,
51
+ inactiveColor: inactiveColorCustom,
52
+ activeColor: activeColorCustom,
53
+ labelStyle,
54
+ onLayout,
55
+ index: tabIndex,
56
+ pressColor,
57
+ pressOpacity,
58
+ defaultTabWidth,
59
+ icon: customIcon,
60
+ badge: customBadge,
61
+ href,
62
+ labelText,
63
+ routesLength,
64
+ android_ripple = ANDROID_RIPPLE_DEFAULT,
65
+ labelAllowFontScaling,
66
+ route
67
+ }) => {
68
+ const labelColorFromStyle = StyleSheet.flatten(labelStyle || {}).color;
69
+ const activeColor = activeColorCustom !== undefined ? activeColorCustom : typeof labelColorFromStyle === 'string' ? labelColorFromStyle : DEFAULT_ACTIVE_COLOR;
70
+ const inactiveColor = inactiveColorCustom !== undefined ? inactiveColorCustom : typeof labelColorFromStyle === 'string' ? labelColorFromStyle : DEFAULT_INACTIVE_COLOR;
71
+ const activeOpacity = getActiveOpacity(position, routesLength, tabIndex);
72
+ const inactiveOpacity = getInactiveOpacity(position, routesLength, tabIndex);
73
+ const icon = React.useMemo(() => {
74
+ if (!customIcon) {
75
+ return null;
76
+ }
77
+ const inactiveIcon = customIcon({
78
+ focused: false,
79
+ color: inactiveColor,
80
+ size: ICON_SIZE,
81
+ route
82
+ });
83
+ const activeIcon = customIcon({
84
+ focused: true,
85
+ color: activeColor,
86
+ size: ICON_SIZE,
87
+ route
88
+ });
89
+ return /*#__PURE__*/_jsxs(View, {
90
+ style: styles.icon,
91
+ children: [/*#__PURE__*/_jsx(Animated.View, {
92
+ style: {
93
+ opacity: inactiveOpacity
94
+ },
95
+ children: inactiveIcon
96
+ }), /*#__PURE__*/_jsx(Animated.View, {
97
+ style: [StyleSheet.absoluteFill, {
98
+ opacity: activeOpacity
99
+ }],
100
+ children: activeIcon
101
+ })]
102
+ });
103
+ }, [activeColor, activeOpacity, customIcon, inactiveColor, inactiveOpacity, route]);
104
+ const renderLabel = React.useCallback(focused => customlabel ? customlabel({
105
+ focused,
106
+ color: focused ? activeColor : inactiveColor,
107
+ style: labelStyle,
108
+ labelText,
109
+ allowFontScaling: labelAllowFontScaling,
110
+ route
111
+ }) : /*#__PURE__*/_jsx(TabBarItemLabel, {
112
+ color: focused ? activeColor : inactiveColor,
113
+ icon: icon,
114
+ label: labelText,
115
+ style: labelStyle
116
+ }), [customlabel, activeColor, labelStyle, labelText, labelAllowFontScaling, route, inactiveColor, icon]);
117
+ const tabStyle = StyleSheet.flatten(style);
118
+ const isWidthSet = tabStyle?.width !== undefined;
119
+ const tabContainerStyle = isWidthSet ? null : {
120
+ width: defaultTabWidth
121
+ };
122
+ accessibilityLabel = typeof accessibilityLabel !== 'undefined' ? accessibilityLabel : labelText;
123
+ return /*#__PURE__*/_jsx(PlatformPressable, {
124
+ android_ripple: android_ripple,
125
+ testID: testID,
126
+ accessible: accessible,
127
+ accessibilityLabel: accessibilityLabel,
128
+ accessibilityRole: "tab",
129
+ accessibilityState: {
130
+ selected: isFocused
131
+ },
132
+ pressColor: pressColor,
133
+ pressOpacity: pressOpacity,
134
+ unstable_pressDelay: 0,
135
+ onLayout: onLayout,
136
+ onPress: onPress,
137
+ onLongPress: onLongPress,
138
+ href: href,
139
+ style: [styles.pressable, tabContainerStyle],
140
+ children: /*#__PURE__*/_jsxs(View, {
141
+ pointerEvents: "none",
142
+ style: [styles.item, tabStyle],
143
+ children: [icon, /*#__PURE__*/_jsxs(View, {
144
+ children: [/*#__PURE__*/_jsx(Animated.View, {
145
+ style: {
146
+ opacity: inactiveOpacity
147
+ },
148
+ children: renderLabel(false)
149
+ }), /*#__PURE__*/_jsx(Animated.View, {
150
+ style: [StyleSheet.absoluteFill, {
151
+ opacity: activeOpacity
152
+ }],
153
+ children: renderLabel(true)
154
+ })]
155
+ }), customBadge != null ? /*#__PURE__*/_jsx(View, {
156
+ style: styles.badge,
157
+ children: customBadge({
158
+ route
159
+ })
160
+ }) : null]
161
+ })
162
+ });
163
+ };
164
+ const MemoizedTabBarItemInternal = /*#__PURE__*/React.memo(TabBarItemInternal);
165
+ export function TabBarItem(props) {
166
+ const {
167
+ onPress,
168
+ onLongPress,
169
+ onLayout,
170
+ navigationState,
171
+ route,
172
+ ...rest
173
+ } = props;
174
+ const onPressLatest = useLatestCallback(onPress);
175
+ const onLongPressLatest = useLatestCallback(onLongPress);
176
+ const onLayoutLatest = useLatestCallback(onLayout ? onLayout : () => {});
177
+ const tabIndex = navigationState.routes.indexOf(route);
178
+ return /*#__PURE__*/_jsx(MemoizedTabBarItemInternal, {
179
+ ...rest,
180
+ onPress: onPressLatest,
181
+ onLayout: onLayoutLatest,
182
+ onLongPress: onLongPressLatest,
183
+ isFocused: navigationState.index === tabIndex,
184
+ route: route,
185
+ index: tabIndex,
186
+ routesLength: navigationState.routes.length
187
+ });
188
+ }
189
+ const styles = StyleSheet.create({
190
+ icon: {
191
+ margin: 2
192
+ },
193
+ item: {
194
+ flex: 1,
195
+ alignItems: 'center',
196
+ justifyContent: 'center',
197
+ padding: 10,
198
+ minHeight: 48
199
+ },
200
+ badge: {
201
+ position: 'absolute',
202
+ top: 0,
203
+ end: 0
204
+ },
205
+ pressable: {
206
+ // The label is not pressable on Windows
207
+ // Adding backgroundColor: 'transparent' seems to fix it
208
+ backgroundColor: 'transparent',
209
+ ...Platform.select({
210
+ // Roundness for iPad hover effect
211
+ ios: {
212
+ borderRadius: 10
213
+ },
214
+ default: null
215
+ })
216
+ }
217
+ });
218
+ //# sourceMappingURL=TabBarItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Animated","Platform","StyleSheet","View","useLatestCallback","PlatformPressable","TabBarItemLabel","jsx","_jsx","jsxs","_jsxs","DEFAULT_ACTIVE_COLOR","DEFAULT_INACTIVE_COLOR","ICON_SIZE","getActiveOpacity","position","routesLength","tabIndex","inputRange","Array","from","length","_","i","interpolate","outputRange","map","getInactiveOpacity","ANDROID_RIPPLE_DEFAULT","borderless","TabBarItemInternal","accessibilityLabel","accessible","label","customlabel","testID","onLongPress","onPress","isFocused","style","inactiveColor","inactiveColorCustom","activeColor","activeColorCustom","labelStyle","onLayout","index","pressColor","pressOpacity","defaultTabWidth","icon","customIcon","badge","customBadge","href","labelText","android_ripple","labelAllowFontScaling","route","labelColorFromStyle","flatten","color","undefined","activeOpacity","inactiveOpacity","useMemo","inactiveIcon","focused","size","activeIcon","styles","children","opacity","absoluteFill","renderLabel","useCallback","allowFontScaling","tabStyle","isWidthSet","width","tabContainerStyle","accessibilityRole","accessibilityState","selected","unstable_pressDelay","pressable","pointerEvents","item","MemoizedTabBarItemInternal","memo","TabBarItem","props","navigationState","rest","onPressLatest","onLongPressLatest","onLayoutLatest","routes","indexOf","create","margin","flex","alignItems","justifyContent","padding","minHeight","top","end","backgroundColor","select","ios","borderRadius","default"],"sourceRoot":"..\\..\\src","sources":["TabBarItem.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EAERC,QAAQ,EAGRC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,OAAOC,iBAAiB,MAAM,qBAAqB;AAEnD,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,eAAe,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAmBpD,MAAMC,oBAAoB,GAAG,wBAAwB;AACrD,MAAMC,sBAAsB,GAAG,0BAA0B;AACzD,MAAMC,SAAS,GAAG,EAAE;AAEpB,MAAMC,gBAAgB,GAAGA,CACvBC,QAAgD,EAChDC,YAAoB,EACpBC,QAAgB,KACb;EACH,IAAID,YAAY,GAAG,CAAC,EAAE;IACpB,MAAME,UAAU,GAAGC,KAAK,CAACC,IAAI,CAAC;MAAEC,MAAM,EAAEL;IAAa,CAAC,EAAE,CAACM,CAAC,EAAEC,CAAC,KAAKA,CAAC,CAAC;IAEp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AE;QAAEC,YAAY,EAAE;MAAG,CAAC;MACzBC,OAAO,EAAE;IACX,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { Animated, StyleSheet } from 'react-native';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ export const TabBarItemLabel = /*#__PURE__*/React.memo(({
7
+ color,
8
+ label,
9
+ style,
10
+ icon
11
+ }) => {
12
+ if (!label) {
13
+ return null;
14
+ }
15
+ return /*#__PURE__*/_jsx(Animated.Text, {
16
+ style: [styles.label, icon ? {
17
+ marginTop: 0
18
+ } : null, style, {
19
+ color: color
20
+ }],
21
+ children: label
22
+ });
23
+ });
24
+ TabBarItemLabel.displayName = 'TabBarItemLabel';
25
+ const styles = StyleSheet.create({
26
+ label: {
27
+ margin: 4,
28
+ fontSize: 14,
29
+ fontWeight: '500',
30
+ backgroundColor: 'transparent'
31
+ }
32
+ });
33
+ //# sourceMappingURL=TabBarItemLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Animated","StyleSheet","jsx","_jsx","TabBarItemLabel","memo","color","label","style","icon","Text","styles","marginTop","children","displayName","create","margin","fontSize","fontWeight","backgroundColor"],"sourceRoot":"..\\..\\src","sources":["TabBarItemLabel.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASpD,OAAO,MAAMC,eAAe,gBAAGL,KAAK,CAACM,IAAI,CACvC,CAAC;EAAEC,KAAK;EAAEC,KAAK;EAAEC,KAAK;EAAEC;AAA2B,CAAC,KAAK;EACvD,IAAI,CAACF,KAAK,EAAE;IACV,OAAO,IAAI;EACb;EAEA,oBACEJ,IAAA,CAACH,QAAQ,CAACU,IAAI;IACZF,KAAK,EAAE,CACLG,MAAM,CAACJ,KAAK,EACZE,IAAI,GAAG;MAAEG,SAAS,EAAE;IAAE,CAAC,GAAG,IAAI,EAC9BJ,KAAK,EACL;MAAEF,KAAK,EAAEA;IAAM,CAAC,CAChB;IAAAO,QAAA,EAEDN;EAAK,CACO,CAAC;AAEpB,CACF,CAAC;AAEDH,eAAe,CAACU,WAAW,GAAG,iBAAiB;AAE/C,MAAMH,MAAM,GAAGV,UAAU,CAACc,MAAM,CAAC;EAC/BR,KAAK,EAAE;IACLS,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { I18nManager, Platform, StyleSheet, View } from 'react-native';
5
+ import { Pager } from './Pager';
6
+ import { SceneView } from "./SceneView.js";
7
+ import { TabBar } from "./TabBar.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ import { createElement as _createElement } from "react";
10
+ const renderLazyPlaceholderDefault = () => null;
11
+ export function TabView({
12
+ onIndexChange,
13
+ navigationState,
14
+ renderScene,
15
+ initialLayout,
16
+ keyboardDismissMode = 'auto',
17
+ lazy = false,
18
+ lazyPreloadDistance = 0,
19
+ onSwipeStart,
20
+ onSwipeEnd,
21
+ renderLazyPlaceholder = renderLazyPlaceholderDefault,
22
+ // eslint-disable-next-line @eslint-react/no-unstable-default-props
23
+ renderTabBar = props => /*#__PURE__*/_jsx(TabBar, {
24
+ ...props
25
+ }),
26
+ pagerStyle,
27
+ style,
28
+ direction = I18nManager.getConstants().isRTL ? 'rtl' : 'ltr',
29
+ swipeEnabled = true,
30
+ tabBarPosition = 'top',
31
+ animationEnabled = true,
32
+ overScrollMode,
33
+ options: sceneOptions,
34
+ commonOptions
35
+ }) {
36
+ if (Platform.OS !== 'web' && direction !== (I18nManager.getConstants().isRTL ? 'rtl' : 'ltr')) {
37
+ console.warn(`The 'direction' prop is set to '${direction}' but the effective value is '${I18nManager.getConstants().isRTL ? 'rtl' : 'ltr'}'. This is not supported. Please use I18nManager.forceRTL to change the layout direction.`);
38
+ }
39
+ const [layout, setLayout] = React.useState({
40
+ width: 0,
41
+ height: 0,
42
+ ...initialLayout
43
+ });
44
+ const jumpToIndex = index => {
45
+ if (index !== navigationState.index) {
46
+ onIndexChange(index);
47
+ }
48
+ };
49
+ const handleLayout = e => {
50
+ const {
51
+ height,
52
+ width
53
+ } = e.nativeEvent.layout;
54
+ setLayout(prevLayout => {
55
+ if (prevLayout.width === width && prevLayout.height === height) {
56
+ return prevLayout;
57
+ }
58
+ return {
59
+ height,
60
+ width
61
+ };
62
+ });
63
+ };
64
+ const options = Object.fromEntries(navigationState.routes.map(route => [route.key, {
65
+ ...commonOptions,
66
+ ...sceneOptions?.[route.key]
67
+ }]));
68
+ return /*#__PURE__*/_jsx(View, {
69
+ onLayout: handleLayout,
70
+ style: [styles.pager, style],
71
+ children: /*#__PURE__*/_jsx(Pager, {
72
+ layout: layout,
73
+ navigationState: navigationState,
74
+ keyboardDismissMode: keyboardDismissMode,
75
+ swipeEnabled: swipeEnabled,
76
+ onSwipeStart: onSwipeStart,
77
+ onSwipeEnd: onSwipeEnd,
78
+ onIndexChange: jumpToIndex,
79
+ animationEnabled: animationEnabled,
80
+ overScrollMode: overScrollMode,
81
+ style: pagerStyle,
82
+ layoutDirection: direction,
83
+ children: ({
84
+ position,
85
+ render,
86
+ addEnterListener,
87
+ jumpTo
88
+ }) => {
89
+ // All the props here must not change between re-renders
90
+ // This is crucial to optimizing the routes with PureComponent
91
+ const sceneRendererProps = {
92
+ position,
93
+ layout,
94
+ jumpTo
95
+ };
96
+ return /*#__PURE__*/_jsxs(React.Fragment, {
97
+ children: [tabBarPosition === 'top' && renderTabBar({
98
+ ...sceneRendererProps,
99
+ options,
100
+ navigationState
101
+ }), render(navigationState.routes.map((route, i) => {
102
+ const {
103
+ sceneStyle
104
+ } = options?.[route.key] ?? {};
105
+ return /*#__PURE__*/_createElement(SceneView, {
106
+ ...sceneRendererProps,
107
+ addEnterListener: addEnterListener,
108
+ key: route.key,
109
+ index: i,
110
+ lazy: typeof lazy === 'function' ? lazy({
111
+ route
112
+ }) : lazy,
113
+ lazyPreloadDistance: lazyPreloadDistance,
114
+ navigationState: navigationState,
115
+ style: sceneStyle
116
+ }, ({
117
+ loading
118
+ }) => loading ? renderLazyPlaceholder({
119
+ route
120
+ }) : renderScene({
121
+ ...sceneRendererProps,
122
+ route
123
+ }));
124
+ })), tabBarPosition === 'bottom' && renderTabBar({
125
+ ...sceneRendererProps,
126
+ options,
127
+ navigationState
128
+ })]
129
+ });
130
+ }
131
+ })
132
+ });
133
+ }
134
+ const styles = StyleSheet.create({
135
+ pager: {
136
+ flex: 1,
137
+ overflow: 'hidden'
138
+ }
139
+ });
140
+ //# sourceMappingURL=TabView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","I18nManager","Platform","StyleSheet","View","Pager","SceneView","TabBar","jsx","_jsx","jsxs","_jsxs","createElement","_createElement","renderLazyPlaceholderDefault","TabView","onIndexChange","navigationState","renderScene","initialLayout","keyboardDismissMode","lazy","lazyPreloadDistance","onSwipeStart","onSwipeEnd","renderLazyPlaceholder","renderTabBar","props","pagerStyle","style","direction","getConstants","isRTL","swipeEnabled","tabBarPosition","animationEnabled","overScrollMode","options","sceneOptions","commonOptions","OS","console","warn","layout","setLayout","useState","width","height","jumpToIndex","index","handleLayout","e","nativeEvent","prevLayout","Object","fromEntries","routes","map","route","key","onLayout","styles","pager","children","layoutDirection","position","render","addEnterListener","jumpTo","sceneRendererProps","Fragment","i","sceneStyle","loading","create","flex","overflow"],"sourceRoot":"..\\..\\src","sources":["TabView.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,WAAW,EAEXC,QAAQ,EAERC,UAAU,EACVC,IAAI,QAEC,cAAc;AAErB,SAASC,KAAK,QAAQ,SAAS;AAC/B,SAASC,SAAS,QAAQ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La,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ export { SceneMap } from "./SceneMap.js";
4
+ export { TabBar } from "./TabBar.js";
5
+ export { TabBarIndicator } from "./TabBarIndicator.js";
6
+ export { TabBarItem } from "./TabBarItem.js";
7
+ export { TabView } from "./TabView.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SceneMap","TabBar","TabBarIndicator","TabBarItem","TabView"],"sourceRoot":"..\\..\\src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,eAAY;AAErC,SAASC,MAAM,QAAQ,aAAU;AAEjC,SAASC,eAAe,QAAQ,sBAAmB;AAEnD,SAASC,UAAU,QAAQ,iBAAc;AAEzC,SAASC,OAAO,QAAQ,cAAW","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\src","sources":["types.tsx"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Animated } from 'react-native';
5
+ export function useAnimatedValue(initialValue) {
6
+ const lazyRef = React.useRef();
7
+ if (lazyRef.current === undefined) {
8
+ lazyRef.current = new Animated.Value(initialValue);
9
+ }
10
+ return lazyRef.current;
11
+ }
12
+ //# sourceMappingURL=useAnimatedValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Animated","useAnimatedValue","initialValue","lazyRef","useRef","current","undefined","Value"],"sourceRoot":"..\\..\\src","sources":["useAnimatedValue.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAO,SAASC,gBAAgBA,CAACC,YAAoB,EAAE;EACrD,MAAMC,OAAO,GAAGJ,KAAK,CAACK,MAAM,CAAiB,CAAC;EAE9C,IAAID,OAAO,CAACE,OAAO,KAAKC,SAAS,EAAE;IACjCH,OAAO,CAACE,OAAO,GAAG,IAAIL,QAAQ,CAACO,KAAK,CAACL,YAAY,CAAC;EACpD;EAEA,OAAOC,OAAO,CAACE,OAAO;AACxB","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,2 @@
1
+ export { PagerViewAdapter as Pager } from './PagerViewAdapter';
2
+ //# sourceMappingURL=Pager.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pager.android.d.ts","sourceRoot":"","sources":["../../../src/Pager.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { PanResponderAdapter as Pager } from './PanResponderAdapter';
2
+ //# sourceMappingURL=Pager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pager.d.ts","sourceRoot":"","sources":["../../../src/Pager.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,IAAI,KAAK,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { PagerViewAdapter as Pager } from './PagerViewAdapter';
2
+ //# sourceMappingURL=Pager.ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pager.ios.d.ts","sourceRoot":"","sources":["../../../src/Pager.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { Animated } from 'react-native';
3
+ import type { EventEmitterProps, NavigationState, PagerProps, Route } from './types';
4
+ type Props<T extends Route> = PagerProps & {
5
+ onIndexChange: (index: number) => void;
6
+ navigationState: NavigationState<T>;
7
+ children: (props: EventEmitterProps & {
8
+ position: Animated.AnimatedInterpolation<number>;
9
+ render: (children: React.ReactNode) => React.ReactNode;
10
+ jumpTo: (key: string) => void;
11
+ }) => React.ReactElement;
12
+ };
13
+ export declare function PagerViewAdapter<T extends Route>({ keyboardDismissMode, swipeEnabled, navigationState, onIndexChange, onSwipeStart, onSwipeEnd, children, style, animationEnabled, ...rest }: Props<T>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
14
+ export {};
15
+ //# sourceMappingURL=PagerViewAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PagerViewAdapter.d.ts","sourceRoot":"","sources":["../../../src/PagerViewAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAkC,MAAM,cAAc,CAAC;AAMxE,OAAO,KAAK,EACV,iBAAiB,EAEjB,eAAe,EACf,UAAU,EACV,KAAK,EACN,MAAM,SAAS,CAAC;AAKjB,KAAK,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,UAAU,GAAG;IACzC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACpC,QAAQ,EAAE,CACR,KAAK,EAAE,iBAAiB,GAAG;QAGzB,QAAQ,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAGjD,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,CAAC;QAGvD,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;KAC/B,KACE,KAAK,CAAC,YAAY,CAAC;CACzB,CAAC;AAIF,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,KAAK,EAAE,EAChD,mBAA4B,EAC5B,YAAmB,EACnB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,KAAK,EACL,gBAAgB,EAChB,GAAG,IAAI,EACR,EAAE,KAAK,CAAC,CAAC,CAAC,sEA8HV"}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { Animated } from 'react-native';
3
+ import type { EventEmitterProps, Layout, NavigationState, PagerProps, Route } from './types';
4
+ type Props<T extends Route> = PagerProps & {
5
+ layout: Layout;
6
+ onIndexChange: (index: number) => void;
7
+ navigationState: NavigationState<T>;
8
+ children: (props: EventEmitterProps & {
9
+ position: Animated.AnimatedInterpolation<number>;
10
+ render: (children: React.ReactNode) => React.ReactNode;
11
+ jumpTo: (key: string) => void;
12
+ }) => React.ReactElement;
13
+ };
14
+ export declare function PanResponderAdapter<T extends Route>({ layout, keyboardDismissMode, swipeEnabled, navigationState, onIndexChange, onSwipeStart, onSwipeEnd, children, style, animationEnabled, layoutDirection, }: Props<T>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
15
+ export {};
16
+ //# sourceMappingURL=PanResponderAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanResponderAdapter.d.ts","sourceRoot":"","sources":["../../../src/PanResponderAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EAOT,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EACV,iBAAiB,EACjB,MAAM,EAEN,eAAe,EACf,UAAU,EACV,KAAK,EACN,MAAM,SAAS,CAAC;AAGjB,KAAK,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,UAAU,GAAG;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACpC,QAAQ,EAAE,CACR,KAAK,EAAE,iBAAiB,GAAG;QAGzB,QAAQ,EAAE,QAAQ,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAGjD,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,CAAC;QAGvD,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;KAC/B,KACE,KAAK,CAAC,YAAY,CAAC;CACzB,CAAC;AAYF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,KAAK,EAAE,EACnD,MAAM,EACN,mBAA4B,EAC5B,YAAmB,EACnB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,KAAK,EACL,gBAAwB,EACxB,eAAuB,GACxB,EAAE,KAAK,CAAC,CAAC,CAAC,sEA2QV"}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { type PressableProps } from 'react-native';
3
+ export type Props = PressableProps & {
4
+ children: React.ReactNode;
5
+ pressColor?: string;
6
+ pressOpacity?: number;
7
+ href?: string;
8
+ };
9
+ /**
10
+ * PlatformPressable provides an abstraction on top of Pressable to handle platform differences.
11
+ */
12
+ export declare function PlatformPressable({ disabled, android_ripple, pressColor, pressOpacity, style, onPress, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
13
+ //# sourceMappingURL=PlatformPressable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlatformPressable.d.ts","sourceRoot":"","sources":["../../../src/PlatformPressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,KAAK,GAAG,cAAc,GAAG;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAMF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,cAAc,EACd,UAAiC,EACjC,YAAY,EACZ,KAAK,EACL,OAAO,EACP,GAAG,IAAI,EACR,EAAE,KAAK,2CA4CP"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import type { SceneRendererProps } from './types';
3
+ type SceneProps = {
4
+ route: any;
5
+ } & Omit<SceneRendererProps, 'layout'>;
6
+ export declare function SceneMap<T>(scenes: {
7
+ [key: string]: React.ComponentType<T>;
8
+ }): ({ route, jumpTo, position }: SceneProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=SceneMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SceneMap.d.ts","sourceRoot":"","sources":["../../../src/SceneMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,GAAG,CAAC;CACZ,GAAG,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;AAavC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;CAAE,IACnE,6BAA6B,UAAU,6CAShD"}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ import type { EventEmitterProps, NavigationState, Route, SceneRendererProps } from './types';
4
+ type Props<T extends Route> = SceneRendererProps & EventEmitterProps & {
5
+ navigationState: NavigationState<T>;
6
+ lazy: boolean;
7
+ lazyPreloadDistance: number;
8
+ index: number;
9
+ children: (props: {
10
+ loading: boolean;
11
+ }) => React.ReactNode;
12
+ style?: StyleProp<ViewStyle>;
13
+ };
14
+ export declare function SceneView<T extends Route>({ children, navigationState, lazy, layout, index, lazyPreloadDistance, addEnterListener, style, }: Props<T>): import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=SceneView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SceneView.d.ts","sourceRoot":"","sources":["../../../src/SceneView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,KAAK,EACL,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAEjB,KAAK,KAAK,CAAC,CAAC,SAAS,KAAK,IAAI,kBAAkB,GAC9C,iBAAiB,GAAG;IAClB,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAC3D,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEJ,wBAAgB,SAAS,CAAC,CAAC,SAAS,KAAK,EAAE,EACzC,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,MAAM,EACN,KAAK,EACL,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,GACN,EAAE,KAAK,CAAC,CAAC,CAAC,2CAsEV"}
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+ import { type PressableAndroidRippleConfig, type StyleProp, type ViewStyle } from 'react-native';
3
+ import { type Props as IndicatorProps } from './TabBarIndicator';
4
+ import { type Props as TabBarItemProps } from './TabBarItem';
5
+ import type { Event, LocaleDirection, NavigationState, Route, Scene, SceneRendererProps, TabDescriptor } from './types';
6
+ export type Props<T extends Route> = SceneRendererProps & {
7
+ navigationState: NavigationState<T>;
8
+ scrollEnabled?: boolean;
9
+ bounces?: boolean;
10
+ activeColor?: string;
11
+ inactiveColor?: string;
12
+ pressColor?: string;
13
+ pressOpacity?: number;
14
+ options?: Record<string, TabDescriptor<T>>;
15
+ renderIndicator?: (props: IndicatorProps<T>) => React.ReactNode;
16
+ renderTabBarItem?: (props: TabBarItemProps<T> & {
17
+ key: string;
18
+ }) => React.ReactElement;
19
+ onTabPress?: (scene: Scene<T> & Event) => void;
20
+ onTabLongPress?: (scene: Scene<T>) => void;
21
+ tabStyle?: StyleProp<ViewStyle>;
22
+ indicatorStyle?: StyleProp<ViewStyle>;
23
+ indicatorContainerStyle?: StyleProp<ViewStyle>;
24
+ contentContainerStyle?: StyleProp<ViewStyle>;
25
+ style?: StyleProp<ViewStyle>;
26
+ direction?: LocaleDirection;
27
+ gap?: number;
28
+ testID?: string;
29
+ android_ripple?: PressableAndroidRippleConfig;
30
+ };
31
+ export declare function TabBar<T extends Route>({ renderIndicator, gap, scrollEnabled, jumpTo, navigationState, position, activeColor, bounces, contentContainerStyle, inactiveColor, indicatorContainerStyle, indicatorStyle, onTabLongPress, onTabPress, pressColor, pressOpacity, direction, renderTabBarItem, style, tabStyle, layout: propLayout, testID, android_ripple, options, }: Props<T>): import("react/jsx-runtime").JSX.Element;
32
+ //# sourceMappingURL=TabBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../src/TabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAQL,KAAK,4BAA4B,EACjC,KAAK,SAAS,EAGd,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,KAAK,KAAK,IAAI,cAAc,EAE7B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,KAAK,IAAI,eAAe,EAAc,MAAM,cAAc,CAAC;AACzE,OAAO,KA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