expo-router 4.0.0-preview.12 → 4.0.0-preview.14
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/assets/error.png +0 -0
- package/assets/file.png +0 -0
- package/assets/forward.png +0 -0
- package/assets/logotype.png +0 -0
- package/assets/pkg.png +0 -0
- package/assets/sitemap.png +0 -0
- package/build/ExpoRoot.js +2 -2
- package/build/ExpoRoot.js.map +1 -1
- package/build/exports.d.ts +1 -1
- package/build/exports.d.ts.map +1 -1
- package/build/exports.js +24 -2
- package/build/exports.js.map +1 -1
- package/build/global-state/router-store.d.ts.map +1 -1
- package/build/global-state/router-store.js +1 -2
- package/build/global-state/router-store.js.map +1 -1
- package/build/layouts/Drawer.d.ts +2 -142
- package/build/layouts/Drawer.d.ts.map +1 -1
- package/build/layouts/Drawer.js +8 -5
- package/build/layouts/Drawer.js.map +1 -1
- package/build/layouts/DrawerClient.d.ts +144 -0
- package/build/layouts/DrawerClient.d.ts.map +1 -0
- package/build/layouts/DrawerClient.js +10 -0
- package/build/layouts/DrawerClient.js.map +1 -0
- package/build/layouts/Stack.d.ts +2 -126
- package/build/layouts/Stack.d.ts.map +1 -1
- package/build/layouts/Stack.js +8 -6
- package/build/layouts/Stack.js.map +1 -1
- package/build/layouts/StackClient.d.ts +128 -0
- package/build/layouts/StackClient.d.ts.map +1 -0
- package/build/layouts/StackClient.js +10 -0
- package/build/layouts/StackClient.js.map +1 -0
- package/build/layouts/Tabs.d.ts +2 -134
- package/build/layouts/Tabs.d.ts.map +1 -1
- package/build/layouts/Tabs.js +5 -37
- package/build/layouts/Tabs.js.map +1 -1
- package/build/layouts/TabsClient.d.ts +136 -0
- package/build/layouts/TabsClient.d.ts.map +1 -0
- package/build/layouts/TabsClient.js +44 -0
- package/build/layouts/TabsClient.js.map +1 -0
- package/build/onboard/Tutorial.d.ts.map +1 -1
- package/build/onboard/Tutorial.js +140 -86
- package/build/onboard/Tutorial.js.map +1 -1
- package/build/renderRootComponent.d.ts.map +1 -1
- package/build/renderRootComponent.js +1 -2
- package/build/renderRootComponent.js.map +1 -1
- package/build/rsc/middleware.d.ts +1 -1
- package/build/rsc/middleware.d.ts.map +1 -1
- package/build/rsc/middleware.js +2 -1
- package/build/rsc/middleware.js.map +1 -1
- package/build/rsc/server.d.ts +3 -0
- package/build/rsc/server.d.ts.map +1 -1
- package/build/rsc/server.js +19 -1
- package/build/rsc/server.js.map +1 -1
- package/build/ui/TabContext.d.ts +3 -2
- package/build/ui/TabContext.d.ts.map +1 -1
- package/build/ui/TabContext.js.map +1 -1
- package/build/ui/TabList.d.ts +3 -3
- package/build/ui/TabList.js +2 -2
- package/build/ui/TabList.js.map +1 -1
- package/build/ui/TabSlot.d.ts +28 -14
- package/build/ui/TabSlot.d.ts.map +1 -1
- package/build/ui/TabSlot.js +9 -7
- package/build/ui/TabSlot.js.map +1 -1
- package/build/ui/TabTrigger.d.ts +22 -9
- package/build/ui/TabTrigger.d.ts.map +1 -1
- package/build/ui/TabTrigger.js +6 -4
- package/build/ui/TabTrigger.js.map +1 -1
- package/build/ui/Tabs.d.ts +16 -23
- package/build/ui/Tabs.d.ts.map +1 -1
- package/build/ui/Tabs.js +15 -10
- package/build/ui/Tabs.js.map +1 -1
- package/build/utils/splash.d.ts +6 -0
- package/build/utils/splash.d.ts.map +1 -0
- package/build/utils/splash.js +51 -0
- package/build/utils/splash.js.map +1 -0
- package/build/views/Sitemap.d.ts.map +1 -1
- package/build/views/Sitemap.js +93 -46
- package/build/views/Sitemap.js.map +1 -1
- package/build/views/Splash.d.ts +1 -1
- package/build/views/Splash.d.ts.map +1 -1
- package/build/views/Splash.js +3 -13
- package/build/views/Splash.js.map +1 -1
- package/build/views/Try.d.ts.map +1 -1
- package/build/views/Try.js +1 -1
- package/build/views/Try.js.map +1 -1
- package/package.json +8 -9
- package/rsc/headers.d.ts +3 -0
- package/rsc/headers.js +5 -0
package/build/layouts/Tabs.d.ts
CHANGED
|
@@ -1,136 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { Href } from '../types';
|
|
5
|
-
type TabsProps = BottomTabNavigationOptions & {
|
|
6
|
-
href?: Href | null;
|
|
7
|
-
};
|
|
8
|
-
export declare const Tabs: React.ForwardRefExoticComponent<Omit<Omit<import("@react-navigation/native").DefaultNavigatorOptions<ParamListBase, string | undefined, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap, import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase>> & import("@react-navigation/native").DefaultRouterOptions & {
|
|
9
|
-
backBehavior?: import("@react-navigation/routers/lib/typescript/commonjs/src/TabRouter").BackBehavior | undefined;
|
|
10
|
-
} & import("@react-navigation/bottom-tabs/lib/typescript/commonjs/src/types").BottomTabNavigationConfig, "children" | "initialRouteName" | "id" | "screenOptions" | "layout" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/native").DefaultRouterOptions<string> & {
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
layout?: ((props: {
|
|
13
|
-
state: TabNavigationState<ParamListBase>;
|
|
14
|
-
navigation: import("@react-navigation/native").NavigationHelpers<ParamListBase, {}>;
|
|
15
|
-
descriptors: Record<string, import("@react-navigation/native").Descriptor<BottomTabNavigationOptions, import("@react-navigation/native").NavigationProp<ParamListBase, string, string | undefined, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap>, import("@react-navigation/native").RouteProp<ParamListBase, string>>>;
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) | undefined;
|
|
18
|
-
screenListeners?: Partial<{
|
|
19
|
-
tabPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabPress", true>;
|
|
20
|
-
tabLongPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabLongPress", unknown>;
|
|
21
|
-
transitionStart: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionStart", unknown>;
|
|
22
|
-
transitionEnd: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionEnd", unknown>;
|
|
23
|
-
focus: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "focus", unknown>;
|
|
24
|
-
blur: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "blur", unknown>;
|
|
25
|
-
state: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "state", unknown>;
|
|
26
|
-
beforeRemove: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "beforeRemove", true>;
|
|
27
|
-
}> | ((props: {
|
|
28
|
-
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
29
|
-
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
30
|
-
}) => Partial<{
|
|
31
|
-
tabPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabPress", true>;
|
|
32
|
-
tabLongPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabLongPress", unknown>;
|
|
33
|
-
transitionStart: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionStart", unknown>;
|
|
34
|
-
transitionEnd: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionEnd", unknown>;
|
|
35
|
-
focus: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "focus", unknown>;
|
|
36
|
-
blur: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "blur", unknown>;
|
|
37
|
-
state: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "state", unknown>;
|
|
38
|
-
beforeRemove: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "beforeRemove", true>;
|
|
39
|
-
}>) | undefined;
|
|
40
|
-
screenOptions?: BottomTabNavigationOptions | ((props: {
|
|
41
|
-
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
42
|
-
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
43
|
-
theme: ReactNavigation.Theme;
|
|
44
|
-
}) => BottomTabNavigationOptions) | undefined;
|
|
45
|
-
screenLayout?: ((props: {
|
|
46
|
-
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
47
|
-
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
48
|
-
theme: ReactNavigation.Theme;
|
|
49
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
50
|
-
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) | undefined;
|
|
51
|
-
UNSTABLE_getStateForRouteNamesChange?: ((state: Readonly<{
|
|
52
|
-
key: string;
|
|
53
|
-
index: number;
|
|
54
|
-
routeNames: string[];
|
|
55
|
-
history?: unknown[] | undefined;
|
|
56
|
-
routes: import("@react-navigation/native").NavigationRoute<ParamListBase, string>[];
|
|
57
|
-
type: string;
|
|
58
|
-
stale: false;
|
|
59
|
-
}>) => import("@react-navigation/native").PartialState<Readonly<{
|
|
60
|
-
key: string;
|
|
61
|
-
index: number;
|
|
62
|
-
routeNames: string[];
|
|
63
|
-
history?: unknown[] | undefined;
|
|
64
|
-
routes: import("@react-navigation/native").NavigationRoute<ParamListBase, string>[];
|
|
65
|
-
type: string;
|
|
66
|
-
stale: false;
|
|
67
|
-
}>> | undefined) | undefined;
|
|
68
|
-
} & {
|
|
69
|
-
id?: undefined;
|
|
70
|
-
}, "children"> & Partial<Pick<Omit<import("@react-navigation/native").DefaultNavigatorOptions<ParamListBase, string | undefined, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap, import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase>> & import("@react-navigation/native").DefaultRouterOptions & {
|
|
71
|
-
backBehavior?: import("@react-navigation/routers/lib/typescript/commonjs/src/TabRouter").BackBehavior | undefined;
|
|
72
|
-
} & import("@react-navigation/bottom-tabs/lib/typescript/commonjs/src/types").BottomTabNavigationConfig, "children" | "initialRouteName" | "id" | "screenOptions" | "layout" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/native").DefaultRouterOptions<string> & {
|
|
73
|
-
children: React.ReactNode;
|
|
74
|
-
layout?: ((props: {
|
|
75
|
-
state: TabNavigationState<ParamListBase>;
|
|
76
|
-
navigation: import("@react-navigation/native").NavigationHelpers<ParamListBase, {}>;
|
|
77
|
-
descriptors: Record<string, import("@react-navigation/native").Descriptor<BottomTabNavigationOptions, import("@react-navigation/native").NavigationProp<ParamListBase, string, string | undefined, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap>, import("@react-navigation/native").RouteProp<ParamListBase, string>>>;
|
|
78
|
-
children: React.ReactNode;
|
|
79
|
-
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) | undefined;
|
|
80
|
-
screenListeners?: Partial<{
|
|
81
|
-
tabPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabPress", true>;
|
|
82
|
-
tabLongPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabLongPress", unknown>;
|
|
83
|
-
transitionStart: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionStart", unknown>;
|
|
84
|
-
transitionEnd: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionEnd", unknown>;
|
|
85
|
-
focus: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "focus", unknown>;
|
|
86
|
-
blur: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "blur", unknown>;
|
|
87
|
-
state: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "state", unknown>;
|
|
88
|
-
beforeRemove: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "beforeRemove", true>;
|
|
89
|
-
}> | ((props: {
|
|
90
|
-
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
91
|
-
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
92
|
-
}) => Partial<{
|
|
93
|
-
tabPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabPress", true>;
|
|
94
|
-
tabLongPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabLongPress", unknown>;
|
|
95
|
-
transitionStart: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionStart", unknown>;
|
|
96
|
-
transitionEnd: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionEnd", unknown>;
|
|
97
|
-
focus: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "focus", unknown>;
|
|
98
|
-
blur: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "blur", unknown>;
|
|
99
|
-
state: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "state", unknown>;
|
|
100
|
-
beforeRemove: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "beforeRemove", true>;
|
|
101
|
-
}>) | undefined;
|
|
102
|
-
screenOptions?: BottomTabNavigationOptions | ((props: {
|
|
103
|
-
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
104
|
-
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
105
|
-
theme: ReactNavigation.Theme;
|
|
106
|
-
}) => BottomTabNavigationOptions) | undefined;
|
|
107
|
-
screenLayout?: ((props: {
|
|
108
|
-
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
109
|
-
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
110
|
-
theme: ReactNavigation.Theme;
|
|
111
|
-
children: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
112
|
-
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) | undefined;
|
|
113
|
-
UNSTABLE_getStateForRouteNamesChange?: ((state: Readonly<{
|
|
114
|
-
key: string;
|
|
115
|
-
index: number;
|
|
116
|
-
routeNames: string[];
|
|
117
|
-
history?: unknown[] | undefined;
|
|
118
|
-
routes: import("@react-navigation/native").NavigationRoute<ParamListBase, string>[];
|
|
119
|
-
type: string;
|
|
120
|
-
stale: false;
|
|
121
|
-
}>) => import("@react-navigation/native").PartialState<Readonly<{
|
|
122
|
-
key: string;
|
|
123
|
-
index: number;
|
|
124
|
-
routeNames: string[];
|
|
125
|
-
history?: unknown[] | undefined;
|
|
126
|
-
routes: import("@react-navigation/native").NavigationRoute<ParamListBase, string>[];
|
|
127
|
-
type: string;
|
|
128
|
-
stale: false;
|
|
129
|
-
}>> | undefined) | undefined;
|
|
130
|
-
} & {
|
|
131
|
-
id?: undefined;
|
|
132
|
-
}, "children">> & React.RefAttributes<unknown>> & {
|
|
133
|
-
Screen: (props: import("..").ScreenProps<TabsProps, TabNavigationState<ParamListBase>, BottomTabNavigationEventMap>) => null;
|
|
134
|
-
};
|
|
1
|
+
import Tabs from './TabsClient';
|
|
2
|
+
export { Tabs };
|
|
135
3
|
export default Tabs;
|
|
136
4
|
//# sourceMappingURL=Tabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/layouts/Tabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/layouts/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,cAAc,CAAC;AAKhC,OAAO,EAAE,IAAI,EAAE,CAAC;AAEhB,eAAe,IAAI,CAAC"}
|
package/build/layouts/Tabs.js
CHANGED
|
@@ -1,44 +1,12 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
"use strict";
|
|
3
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
4
|
};
|
|
6
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
6
|
exports.Tabs = void 0;
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// This is the only way to access the navigator.
|
|
14
|
-
const BottomTabNavigator = (0, bottom_tabs_1.createBottomTabNavigator)().Navigator;
|
|
15
|
-
exports.Tabs = (0, withLayoutContext_1.withLayoutContext)(BottomTabNavigator, (screens) => {
|
|
16
|
-
// Support the `href` shortcut prop.
|
|
17
|
-
return screens.map((screen) => {
|
|
18
|
-
if (typeof screen.options !== 'function' && screen.options?.href !== undefined) {
|
|
19
|
-
const { href, ...options } = screen.options;
|
|
20
|
-
if (options.tabBarButton) {
|
|
21
|
-
throw new Error('Cannot use `href` and `tabBarButton` together.');
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
...screen,
|
|
25
|
-
options: {
|
|
26
|
-
...options,
|
|
27
|
-
tabBarItemStyle: href == null ? { display: 'none' } : options.tabBarItemStyle,
|
|
28
|
-
tabBarButton: (props) => {
|
|
29
|
-
if (href == null) {
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
const children = react_native_1.Platform.OS === 'web' ? props.children : <react_native_1.Pressable>{props.children}</react_native_1.Pressable>;
|
|
33
|
-
// TODO: React Navigation types these props as Animated.WithAnimatedValue<StyleProp<ViewStyle>>
|
|
34
|
-
// While Link expects a TextStyle. We need to reconcile these types.
|
|
35
|
-
return (<Link_1.Link {...props} style={[{ display: 'flex' }, props.style]} href={href} asChild={react_native_1.Platform.OS !== 'web'} children={children}/>);
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
return screen;
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
exports.default = exports.Tabs;
|
|
7
|
+
const TabsClient_1 = __importDefault(require("./TabsClient"));
|
|
8
|
+
exports.Tabs = TabsClient_1.default;
|
|
9
|
+
const Screen_1 = require("../views/Screen");
|
|
10
|
+
TabsClient_1.default.Screen = Screen_1.Screen;
|
|
11
|
+
exports.default = TabsClient_1.default;
|
|
44
12
|
//# sourceMappingURL=Tabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/layouts/Tabs.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/layouts/Tabs.tsx"],"names":[],"mappings":";;;;;;AAAA,8DAAgC;AAKvB,eALF,oBAAI,CAKE;AAJb,4CAAyC;AAEzC,oBAAI,CAAC,MAAM,GAAG,eAAM,CAAC;AAIrB,kBAAe,oBAAI,CAAC","sourcesContent":["import Tabs from './TabsClient';\nimport { Screen } from '../views/Screen';\n\nTabs.Screen = Screen;\n\nexport { Tabs };\n\nexport default Tabs;\n"]}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { BottomTabNavigationEventMap, BottomTabNavigationOptions } from '@react-navigation/bottom-tabs';
|
|
2
|
+
import { ParamListBase, TabNavigationState } from '@react-navigation/native';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Href } from '../types';
|
|
5
|
+
type TabsProps = BottomTabNavigationOptions & {
|
|
6
|
+
href?: Href | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const Tabs: React.ForwardRefExoticComponent<Omit<Omit<import("@react-navigation/native").DefaultNavigatorOptions<ParamListBase, string | undefined, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap, import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase>> & import("@react-navigation/native").DefaultRouterOptions & {
|
|
9
|
+
backBehavior?: import("@react-navigation/routers/lib/typescript/commonjs/src/TabRouter").BackBehavior | undefined;
|
|
10
|
+
} & import("@react-navigation/bottom-tabs/lib/typescript/commonjs/src/types").BottomTabNavigationConfig, "children" | "initialRouteName" | "id" | "screenOptions" | "layout" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/native").DefaultRouterOptions<string> & {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
layout?: ((props: {
|
|
13
|
+
state: TabNavigationState<ParamListBase>;
|
|
14
|
+
navigation: import("@react-navigation/native").NavigationHelpers<ParamListBase, {}>;
|
|
15
|
+
descriptors: Record<string, import("@react-navigation/native").Descriptor<BottomTabNavigationOptions, import("@react-navigation/native").NavigationProp<ParamListBase, string, string | undefined, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap>, import("@react-navigation/native").RouteProp<ParamListBase, string>>>;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) | undefined;
|
|
18
|
+
screenListeners?: Partial<{
|
|
19
|
+
tabPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabPress", true>;
|
|
20
|
+
tabLongPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabLongPress", unknown>;
|
|
21
|
+
transitionStart: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionStart", unknown>;
|
|
22
|
+
transitionEnd: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionEnd", unknown>;
|
|
23
|
+
focus: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "focus", unknown>;
|
|
24
|
+
blur: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "blur", unknown>;
|
|
25
|
+
state: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "state", unknown>;
|
|
26
|
+
beforeRemove: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "beforeRemove", true>;
|
|
27
|
+
}> | ((props: {
|
|
28
|
+
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
29
|
+
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
30
|
+
}) => Partial<{
|
|
31
|
+
tabPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabPress", true>;
|
|
32
|
+
tabLongPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabLongPress", unknown>;
|
|
33
|
+
transitionStart: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionStart", unknown>;
|
|
34
|
+
transitionEnd: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionEnd", unknown>;
|
|
35
|
+
focus: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "focus", unknown>;
|
|
36
|
+
blur: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "blur", unknown>;
|
|
37
|
+
state: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "state", unknown>;
|
|
38
|
+
beforeRemove: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "beforeRemove", true>;
|
|
39
|
+
}>) | undefined;
|
|
40
|
+
screenOptions?: BottomTabNavigationOptions | ((props: {
|
|
41
|
+
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
42
|
+
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
43
|
+
theme: ReactNavigation.Theme;
|
|
44
|
+
}) => BottomTabNavigationOptions) | undefined;
|
|
45
|
+
screenLayout?: ((props: {
|
|
46
|
+
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
47
|
+
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
48
|
+
theme: ReactNavigation.Theme;
|
|
49
|
+
children: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
50
|
+
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) | undefined;
|
|
51
|
+
UNSTABLE_getStateForRouteNamesChange?: ((state: Readonly<{
|
|
52
|
+
key: string;
|
|
53
|
+
index: number;
|
|
54
|
+
routeNames: string[];
|
|
55
|
+
history?: unknown[] | undefined;
|
|
56
|
+
routes: import("@react-navigation/native").NavigationRoute<ParamListBase, string>[];
|
|
57
|
+
type: string;
|
|
58
|
+
stale: false;
|
|
59
|
+
}>) => import("@react-navigation/native").PartialState<Readonly<{
|
|
60
|
+
key: string;
|
|
61
|
+
index: number;
|
|
62
|
+
routeNames: string[];
|
|
63
|
+
history?: unknown[] | undefined;
|
|
64
|
+
routes: import("@react-navigation/native").NavigationRoute<ParamListBase, string>[];
|
|
65
|
+
type: string;
|
|
66
|
+
stale: false;
|
|
67
|
+
}>> | undefined) | undefined;
|
|
68
|
+
} & {
|
|
69
|
+
id?: undefined;
|
|
70
|
+
}, "children"> & Partial<Pick<Omit<import("@react-navigation/native").DefaultNavigatorOptions<ParamListBase, string | undefined, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap, import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase>> & import("@react-navigation/native").DefaultRouterOptions & {
|
|
71
|
+
backBehavior?: import("@react-navigation/routers/lib/typescript/commonjs/src/TabRouter").BackBehavior | undefined;
|
|
72
|
+
} & import("@react-navigation/bottom-tabs/lib/typescript/commonjs/src/types").BottomTabNavigationConfig, "children" | "initialRouteName" | "id" | "screenOptions" | "layout" | "screenListeners" | "screenLayout" | "UNSTABLE_getStateForRouteNamesChange"> & import("@react-navigation/native").DefaultRouterOptions<string> & {
|
|
73
|
+
children: React.ReactNode;
|
|
74
|
+
layout?: ((props: {
|
|
75
|
+
state: TabNavigationState<ParamListBase>;
|
|
76
|
+
navigation: import("@react-navigation/native").NavigationHelpers<ParamListBase, {}>;
|
|
77
|
+
descriptors: Record<string, import("@react-navigation/native").Descriptor<BottomTabNavigationOptions, import("@react-navigation/native").NavigationProp<ParamListBase, string, string | undefined, TabNavigationState<ParamListBase>, BottomTabNavigationOptions, BottomTabNavigationEventMap>, import("@react-navigation/native").RouteProp<ParamListBase, string>>>;
|
|
78
|
+
children: React.ReactNode;
|
|
79
|
+
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) | undefined;
|
|
80
|
+
screenListeners?: Partial<{
|
|
81
|
+
tabPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabPress", true>;
|
|
82
|
+
tabLongPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabLongPress", unknown>;
|
|
83
|
+
transitionStart: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionStart", unknown>;
|
|
84
|
+
transitionEnd: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionEnd", unknown>;
|
|
85
|
+
focus: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "focus", unknown>;
|
|
86
|
+
blur: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "blur", unknown>;
|
|
87
|
+
state: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "state", unknown>;
|
|
88
|
+
beforeRemove: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "beforeRemove", true>;
|
|
89
|
+
}> | ((props: {
|
|
90
|
+
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
91
|
+
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
92
|
+
}) => Partial<{
|
|
93
|
+
tabPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabPress", true>;
|
|
94
|
+
tabLongPress: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "tabLongPress", unknown>;
|
|
95
|
+
transitionStart: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionStart", unknown>;
|
|
96
|
+
transitionEnd: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "transitionEnd", unknown>;
|
|
97
|
+
focus: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "focus", unknown>;
|
|
98
|
+
blur: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "blur", unknown>;
|
|
99
|
+
state: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "state", unknown>;
|
|
100
|
+
beforeRemove: import("@react-navigation/native").EventListenerCallback<BottomTabNavigationEventMap & import("@react-navigation/native").EventMapCore<TabNavigationState<ParamListBase>>, "beforeRemove", true>;
|
|
101
|
+
}>) | undefined;
|
|
102
|
+
screenOptions?: BottomTabNavigationOptions | ((props: {
|
|
103
|
+
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
104
|
+
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
105
|
+
theme: ReactNavigation.Theme;
|
|
106
|
+
}) => BottomTabNavigationOptions) | undefined;
|
|
107
|
+
screenLayout?: ((props: {
|
|
108
|
+
route: import("@react-navigation/native").RouteProp<ParamListBase, string>;
|
|
109
|
+
navigation: import("@react-navigation/bottom-tabs").BottomTabNavigationProp<ParamListBase, string, undefined>;
|
|
110
|
+
theme: ReactNavigation.Theme;
|
|
111
|
+
children: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
112
|
+
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) | undefined;
|
|
113
|
+
UNSTABLE_getStateForRouteNamesChange?: ((state: Readonly<{
|
|
114
|
+
key: string;
|
|
115
|
+
index: number;
|
|
116
|
+
routeNames: string[];
|
|
117
|
+
history?: unknown[] | undefined;
|
|
118
|
+
routes: import("@react-navigation/native").NavigationRoute<ParamListBase, string>[];
|
|
119
|
+
type: string;
|
|
120
|
+
stale: false;
|
|
121
|
+
}>) => import("@react-navigation/native").PartialState<Readonly<{
|
|
122
|
+
key: string;
|
|
123
|
+
index: number;
|
|
124
|
+
routeNames: string[];
|
|
125
|
+
history?: unknown[] | undefined;
|
|
126
|
+
routes: import("@react-navigation/native").NavigationRoute<ParamListBase, string>[];
|
|
127
|
+
type: string;
|
|
128
|
+
stale: false;
|
|
129
|
+
}>> | undefined) | undefined;
|
|
130
|
+
} & {
|
|
131
|
+
id?: undefined;
|
|
132
|
+
}, "children">> & React.RefAttributes<unknown>> & {
|
|
133
|
+
Screen: (props: import("..").ScreenProps<TabsProps, TabNavigationState<ParamListBase>, BottomTabNavigationEventMap>) => null;
|
|
134
|
+
};
|
|
135
|
+
export default Tabs;
|
|
136
|
+
//# sourceMappingURL=TabsClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabsClient.d.ts","sourceRoot":"","sources":["../../src/layouts/TabsClient.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAE3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAKhC,KAAK,SAAS,GAAG,0BAA0B,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE,CAAC;AAErE,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCf,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Tabs = void 0;
|
|
8
|
+
const bottom_tabs_1 = require("@react-navigation/bottom-tabs");
|
|
9
|
+
const react_1 = __importDefault(require("react"));
|
|
10
|
+
const react_native_1 = require("react-native");
|
|
11
|
+
const withLayoutContext_1 = require("./withLayoutContext");
|
|
12
|
+
const Link_1 = require("../link/Link");
|
|
13
|
+
// This is the only way to access the navigator.
|
|
14
|
+
const BottomTabNavigator = (0, bottom_tabs_1.createBottomTabNavigator)().Navigator;
|
|
15
|
+
exports.Tabs = (0, withLayoutContext_1.withLayoutContext)(BottomTabNavigator, (screens) => {
|
|
16
|
+
// Support the `href` shortcut prop.
|
|
17
|
+
return screens.map((screen) => {
|
|
18
|
+
if (typeof screen.options !== 'function' && screen.options?.href !== undefined) {
|
|
19
|
+
const { href, ...options } = screen.options;
|
|
20
|
+
if (options.tabBarButton) {
|
|
21
|
+
throw new Error('Cannot use `href` and `tabBarButton` together.');
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
...screen,
|
|
25
|
+
options: {
|
|
26
|
+
...options,
|
|
27
|
+
tabBarItemStyle: href == null ? { display: 'none' } : options.tabBarItemStyle,
|
|
28
|
+
tabBarButton: (props) => {
|
|
29
|
+
if (href == null) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const children = react_native_1.Platform.OS === 'web' ? props.children : <react_native_1.Pressable>{props.children}</react_native_1.Pressable>;
|
|
33
|
+
// TODO: React Navigation types these props as Animated.WithAnimatedValue<StyleProp<ViewStyle>>
|
|
34
|
+
// While Link expects a TextStyle. We need to reconcile these types.
|
|
35
|
+
return (<Link_1.Link {...props} style={[{ display: 'flex' }, props.style]} href={href} asChild={react_native_1.Platform.OS !== 'web'} children={children}/>);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return screen;
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
exports.default = exports.Tabs;
|
|
44
|
+
//# sourceMappingURL=TabsClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabsClient.js","sourceRoot":"","sources":["../../src/layouts/TabsClient.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;AAEb,+DAIuC;AAEvC,kDAA0B;AAC1B,+CAAmD;AAEnD,2DAAwD;AACxD,uCAAoC;AAGpC,gDAAgD;AAChD,MAAM,kBAAkB,GAAG,IAAA,sCAAwB,GAAE,CAAC,SAAS,CAAC;AAInD,QAAA,IAAI,GAAG,IAAA,qCAAiB,EAKnC,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE;IAChC,oCAAoC;IACpC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU,IAAI,MAAM,CAAC,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE;YAC9E,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;YAC5C,IAAI,OAAO,CAAC,YAAY,EAAE;gBACxB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;aACnE;YACD,OAAO;gBACL,GAAG,MAAM;gBACT,OAAO,EAAE;oBACP,GAAG,OAAO;oBACV,eAAe,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe;oBAC7E,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE;wBACtB,IAAI,IAAI,IAAI,IAAI,EAAE;4BAChB,OAAO,IAAI,CAAC;yBACb;wBACD,MAAM,QAAQ,GACZ,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,wBAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,wBAAS,CAAC,CAAC;wBACnF,+FAA+F;wBAC/F,0EAA0E;wBAC1E,OAAO,CACL,CAAC,WAAI,CACH,IAAK,KAAa,CAAC,CACnB,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,KAAY,CAAC,CAAC,CACjD,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,OAAO,CAAC,CAAC,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAC/B,QAAQ,CAAC,CAAC,QAAQ,CAAC,EACnB,CACH,CAAC;oBACJ,CAAC;iBACF;aACF,CAAC;SACH;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,kBAAe,YAAI,CAAC","sourcesContent":["'use client';\n\nimport {\n BottomTabNavigationEventMap,\n BottomTabNavigationOptions,\n createBottomTabNavigator,\n} from '@react-navigation/bottom-tabs';\nimport { ParamListBase, TabNavigationState } from '@react-navigation/native';\nimport React from 'react';\nimport { Pressable, Platform } from 'react-native';\n\nimport { withLayoutContext } from './withLayoutContext';\nimport { Link } from '../link/Link';\nimport { Href } from '../types';\n\n// This is the only way to access the navigator.\nconst BottomTabNavigator = createBottomTabNavigator().Navigator;\n\ntype TabsProps = BottomTabNavigationOptions & { href?: Href | null };\n\nexport const Tabs = withLayoutContext<\n TabsProps,\n typeof BottomTabNavigator,\n TabNavigationState<ParamListBase>,\n BottomTabNavigationEventMap\n>(BottomTabNavigator, (screens) => {\n // Support the `href` shortcut prop.\n return screens.map((screen) => {\n if (typeof screen.options !== 'function' && screen.options?.href !== undefined) {\n const { href, ...options } = screen.options;\n if (options.tabBarButton) {\n throw new Error('Cannot use `href` and `tabBarButton` together.');\n }\n return {\n ...screen,\n options: {\n ...options,\n tabBarItemStyle: href == null ? { display: 'none' } : options.tabBarItemStyle,\n tabBarButton: (props) => {\n if (href == null) {\n return null;\n }\n const children =\n Platform.OS === 'web' ? props.children : <Pressable>{props.children}</Pressable>;\n // TODO: React Navigation types these props as Animated.WithAnimatedValue<StyleProp<ViewStyle>>\n // While Link expects a TextStyle. We need to reconcile these types.\n return (\n <Link\n {...(props as any)}\n style={[{ display: 'flex' }, props.style as any]}\n href={href}\n asChild={Platform.OS !== 'web'}\n children={children}\n />\n );\n },\n },\n };\n }\n return screen;\n });\n});\n\nexport default Tabs;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tutorial.d.ts","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tutorial.d.ts","sourceRoot":"","sources":["../../src/onboard/Tutorial.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,wBAAgB,QAAQ,sBAgEvB"}
|