@teardown/cli 1.2.39 → 2.0.42
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/bin/teardown.js +11 -1
- package/package.json +77 -57
- package/src/cli/commands/init.ts +254 -0
- package/src/cli/commands/plugins.ts +93 -0
- package/src/cli/commands/prebuild.ts +168 -0
- package/src/cli/commands/run.ts +727 -0
- package/src/cli/commands/start.ts +87 -0
- package/src/cli/commands/validate.ts +62 -0
- package/src/cli/index.ts +59 -0
- package/src/config/index.ts +45 -0
- package/src/config/loader.ts +366 -0
- package/src/config/schema.ts +235 -0
- package/src/config/types.ts +322 -0
- package/src/index.ts +177 -0
- package/src/pipeline/cache.ts +179 -0
- package/src/pipeline/index.ts +10 -0
- package/src/pipeline/stages.ts +692 -0
- package/src/plugins/base.ts +370 -0
- package/src/plugins/capabilities/biometrics.ts +64 -0
- package/src/plugins/capabilities/bluetooth.ts +86 -0
- package/src/plugins/capabilities/calendar.ts +57 -0
- package/src/plugins/capabilities/camera.ts +77 -0
- package/src/plugins/capabilities/contacts.ts +57 -0
- package/src/plugins/capabilities/deep-linking.ts +124 -0
- package/src/plugins/capabilities/firebase.ts +138 -0
- package/src/plugins/capabilities/index.ts +96 -0
- package/src/plugins/capabilities/location.ts +87 -0
- package/src/plugins/capabilities/photo-library.ts +80 -0
- package/src/plugins/capabilities/push-notifications.ts +98 -0
- package/src/plugins/capabilities/sign-in-with-apple.ts +53 -0
- package/src/plugins/context.ts +220 -0
- package/src/plugins/index.ts +26 -0
- package/src/plugins/resolver.ts +321 -0
- package/src/templates/generator.ts +507 -0
- package/src/templates/index.ts +9 -0
- package/src/templates/paths.ts +25 -0
- package/src/transformers/android/gradle.ts +400 -0
- package/src/transformers/android/index.ts +19 -0
- package/src/transformers/android/manifest.ts +506 -0
- package/src/transformers/index.ts +39 -0
- package/src/transformers/ios/entitlements.ts +283 -0
- package/src/transformers/ios/index.ts +10 -0
- package/src/transformers/ios/pbxproj.ts +267 -0
- package/src/transformers/ios/plist.ts +198 -0
- package/src/utils/fs.ts +429 -0
- package/src/utils/index.ts +21 -0
- package/src/utils/logger.ts +203 -0
- package/templates/.gitignore +63 -0
- package/templates/Gemfile +3 -0
- package/templates/android/app/build.gradle.kts +97 -0
- package/templates/android/app/proguard-rules.pro +10 -0
- package/templates/android/app/src/main/AndroidManifest.xml +26 -0
- package/templates/android/app/src/main/java/com/appname/MainActivity.kt +22 -0
- package/templates/android/app/src/main/java/com/appname/MainApplication.kt +44 -0
- package/templates/android/app/src/main/res/values/strings.xml +3 -0
- package/templates/android/app/src/main/res/values/styles.xml +7 -0
- package/templates/android/build.gradle.kts +44 -0
- package/templates/android/gradle.properties +39 -0
- package/templates/android/settings.gradle.kts +12 -0
- package/templates/babel.config.js +15 -0
- package/templates/index.js +7 -0
- package/templates/ios/.xcode.env +11 -0
- package/templates/ios/AppName/AppDelegate.swift +25 -0
- package/templates/ios/AppName/AppName-Bridging-Header.h +4 -0
- package/templates/ios/AppName/AppName.entitlements +6 -0
- package/templates/ios/AppName/Images.xcassets/AppIcon.appiconset/Contents.json +35 -0
- package/templates/ios/AppName/Images.xcassets/Contents.json +6 -0
- package/templates/ios/AppName/Info.plist +49 -0
- package/templates/ios/AppName/LaunchScreen.storyboard +38 -0
- package/templates/ios/AppName.xcodeproj/project.pbxproj +402 -0
- package/templates/ios/AppName.xcodeproj/xcshareddata/xcschemes/AppName.xcscheme +78 -0
- package/templates/ios/Podfile +35 -0
- package/templates/metro.config.js +41 -0
- package/templates/package.json +57 -0
- package/templates/react-native.config.js +8 -0
- package/templates/src/app/index.tsx +34 -0
- package/templates/src/assets/fonts/.gitkeep +1 -0
- package/templates/src/assets/images/.gitkeep +1 -0
- package/templates/src/components/ui/accordion.tsx +114 -0
- package/templates/src/components/ui/avatar.tsx +75 -0
- package/templates/src/components/ui/button.tsx +93 -0
- package/templates/src/components/ui/card.tsx +120 -0
- package/templates/src/components/ui/checkbox.tsx +133 -0
- package/templates/src/components/ui/chip.tsx +95 -0
- package/templates/src/components/ui/dialog.tsx +134 -0
- package/templates/src/components/ui/divider.tsx +67 -0
- package/templates/src/components/ui/error-view.tsx +82 -0
- package/templates/src/components/ui/form-field.tsx +101 -0
- package/templates/src/components/ui/index.ts +100 -0
- package/templates/src/components/ui/popover.tsx +92 -0
- package/templates/src/components/ui/pressable-feedback.tsx +88 -0
- package/templates/src/components/ui/radio-group.tsx +153 -0
- package/templates/src/components/ui/scroll-shadow.tsx +108 -0
- package/templates/src/components/ui/select.tsx +165 -0
- package/templates/src/components/ui/skeleton-group.tsx +97 -0
- package/templates/src/components/ui/skeleton.tsx +87 -0
- package/templates/src/components/ui/spinner.tsx +87 -0
- package/templates/src/components/ui/surface.tsx +95 -0
- package/templates/src/components/ui/switch.tsx +124 -0
- package/templates/src/components/ui/tabs.tsx +154 -0
- package/templates/src/components/ui/text-field.tsx +106 -0
- package/templates/src/components/ui/toast.tsx +129 -0
- package/templates/src/contexts/.gitkeep +2 -0
- package/templates/src/core/clients/api/api.client.ts +113 -0
- package/templates/src/core/clients/api/index.ts +1 -0
- package/templates/src/core/clients/storage/index.ts +1 -0
- package/templates/src/core/clients/storage/storage.client.ts +121 -0
- package/templates/src/core/constants/index.ts +19 -0
- package/templates/src/core/core.ts +40 -0
- package/templates/src/core/index.ts +10 -0
- package/templates/src/global.css +87 -0
- package/templates/src/hooks/index.ts +6 -0
- package/templates/src/hooks/use-debounce.ts +23 -0
- package/templates/src/hooks/use-mounted.ts +21 -0
- package/templates/src/index.ts +28 -0
- package/templates/src/lib/index.ts +5 -0
- package/templates/src/lib/utils.ts +115 -0
- package/templates/src/modules/.gitkeep +6 -0
- package/templates/src/navigation/index.ts +8 -0
- package/templates/src/navigation/navigation-provider.tsx +36 -0
- package/templates/src/navigation/router.tsx +137 -0
- package/templates/src/providers/app.provider.tsx +29 -0
- package/templates/src/providers/index.ts +5 -0
- package/templates/src/routes/(tabs)/_layout.tsx +42 -0
- package/templates/src/routes/(tabs)/explore.tsx +161 -0
- package/templates/src/routes/(tabs)/home.tsx +138 -0
- package/templates/src/routes/(tabs)/profile.tsx +151 -0
- package/templates/src/routes/_layout.tsx +18 -0
- package/templates/src/routes/settings.tsx +194 -0
- package/templates/src/screens/auth/index.ts +6 -0
- package/templates/src/screens/auth/login.tsx +165 -0
- package/templates/src/screens/auth/register.tsx +203 -0
- package/templates/src/screens/home.tsx +204 -0
- package/templates/src/screens/index.ts +17 -0
- package/templates/src/screens/profile.tsx +210 -0
- package/templates/src/screens/settings.tsx +216 -0
- package/templates/src/screens/welcome.tsx +101 -0
- package/templates/src/styles/index.ts +103 -0
- package/templates/src/types/common.ts +71 -0
- package/templates/src/types/index.ts +5 -0
- package/templates/tsconfig.json +14 -0
- package/README.md +0 -15
- package/assets/favicon.ico +0 -0
- package/dist/commands/dev/dev.d.ts +0 -22
- package/dist/commands/dev/dev.js +0 -56
- package/dist/commands/dev/dev.js.map +0 -1
- package/dist/commands/init/init-teardown.d.ts +0 -9
- package/dist/commands/init/init-teardown.js +0 -27
- package/dist/commands/init/init-teardown.js.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -21
- package/dist/index.js.map +0 -1
- package/dist/modules/dev/dev-menu/keyboard-handler.d.ts +0 -21
- package/dist/modules/dev/dev-menu/keyboard-handler.js +0 -139
- package/dist/modules/dev/dev-menu/keyboard-handler.js.map +0 -1
- package/dist/modules/dev/dev-menu/open-debugger-keyboard-handler.d.ts +0 -18
- package/dist/modules/dev/dev-menu/open-debugger-keyboard-handler.js +0 -106
- package/dist/modules/dev/dev-menu/open-debugger-keyboard-handler.js.map +0 -1
- package/dist/modules/dev/dev-server/cdp/cdp.adapter.d.ts +0 -6
- package/dist/modules/dev/dev-server/cdp/cdp.adapter.js +0 -13
- package/dist/modules/dev/dev-server/cdp/cdp.adapter.js.map +0 -1
- package/dist/modules/dev/dev-server/cdp/index.d.ts +0 -2
- package/dist/modules/dev/dev-server/cdp/index.js +0 -19
- package/dist/modules/dev/dev-server/cdp/index.js.map +0 -1
- package/dist/modules/dev/dev-server/cdp/types.d.ts +0 -107
- package/dist/modules/dev/dev-server/cdp/types.js +0 -3
- package/dist/modules/dev/dev-server/cdp/types.js.map +0 -1
- package/dist/modules/dev/dev-server/dev-server-checker.d.ts +0 -22
- package/dist/modules/dev/dev-server/dev-server-checker.js +0 -73
- package/dist/modules/dev/dev-server/dev-server-checker.js.map +0 -1
- package/dist/modules/dev/dev-server/dev-server.d.ts +0 -74
- package/dist/modules/dev/dev-server/dev-server.js +0 -272
- package/dist/modules/dev/dev-server/dev-server.js.map +0 -1
- package/dist/modules/dev/dev-server/inspector/device.d.ts +0 -46
- package/dist/modules/dev/dev-server/inspector/device.event-reporter.d.ts +0 -37
- package/dist/modules/dev/dev-server/inspector/device.event-reporter.js +0 -166
- package/dist/modules/dev/dev-server/inspector/device.event-reporter.js.map +0 -1
- package/dist/modules/dev/dev-server/inspector/device.js +0 -578
- package/dist/modules/dev/dev-server/inspector/device.js.map +0 -1
- package/dist/modules/dev/dev-server/inspector/inspector.d.ts +0 -27
- package/dist/modules/dev/dev-server/inspector/inspector.js +0 -225
- package/dist/modules/dev/dev-server/inspector/inspector.js.map +0 -1
- package/dist/modules/dev/dev-server/inspector/types.d.ts +0 -156
- package/dist/modules/dev/dev-server/inspector/types.js +0 -3
- package/dist/modules/dev/dev-server/inspector/types.js.map +0 -1
- package/dist/modules/dev/dev-server/inspector/wss/servers/debugger-connection.server.d.ts +0 -14
- package/dist/modules/dev/dev-server/inspector/wss/servers/debugger-connection.server.js +0 -63
- package/dist/modules/dev/dev-server/inspector/wss/servers/debugger-connection.server.js.map +0 -1
- package/dist/modules/dev/dev-server/inspector/wss/servers/device-connection.server.d.ts +0 -19
- package/dist/modules/dev/dev-server/inspector/wss/servers/device-connection.server.js +0 -66
- package/dist/modules/dev/dev-server/inspector/wss/servers/device-connection.server.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/devtools.plugin.d.ts +0 -1
- package/dist/modules/dev/dev-server/plugins/devtools.plugin.js +0 -51
- package/dist/modules/dev/dev-server/plugins/devtools.plugin.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/favicon.plugin.d.ts +0 -1
- package/dist/modules/dev/dev-server/plugins/favicon.plugin.js +0 -19
- package/dist/modules/dev/dev-server/plugins/favicon.plugin.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/multipart.plugin.d.ts +0 -1
- package/dist/modules/dev/dev-server/plugins/multipart.plugin.js +0 -63
- package/dist/modules/dev/dev-server/plugins/multipart.plugin.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/systrace.plugin.d.ts +0 -1
- package/dist/modules/dev/dev-server/plugins/systrace.plugin.js +0 -29
- package/dist/modules/dev/dev-server/plugins/systrace.plugin.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/types.d.ts +0 -11
- package/dist/modules/dev/dev-server/plugins/types.js +0 -3
- package/dist/modules/dev/dev-server/plugins/types.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/index.d.ts +0 -3
- package/dist/modules/dev/dev-server/plugins/wss/index.js +0 -20
- package/dist/modules/dev/dev-server/plugins/wss/index.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-api.server.d.ts +0 -37
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-api.server.js +0 -67
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-api.server.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-debugger.server.d.ts +0 -63
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-debugger.server.js +0 -129
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-debugger.server.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-dev-client.server.d.ts +0 -32
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-dev-client.server.js +0 -76
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-dev-client.server.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-events.server.d.ts +0 -75
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-events.server.js +0 -199
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-events.server.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-hmr.server.d.ts +0 -44
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-hmr.server.js +0 -121
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-hmr.server.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-message.server.d.ts +0 -135
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-message.server.js +0 -364
- package/dist/modules/dev/dev-server/plugins/wss/servers/web-socket-message.server.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/types.d.ts +0 -6
- package/dist/modules/dev/dev-server/plugins/wss/types.js +0 -3
- package/dist/modules/dev/dev-server/plugins/wss/types.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/web-socket-router.d.ts +0 -32
- package/dist/modules/dev/dev-server/plugins/wss/web-socket-router.js +0 -58
- package/dist/modules/dev/dev-server/plugins/wss/web-socket-router.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/web-socket-server-adapter.d.ts +0 -13
- package/dist/modules/dev/dev-server/plugins/wss/web-socket-server-adapter.js +0 -27
- package/dist/modules/dev/dev-server/plugins/wss/web-socket-server-adapter.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/web-socket-server.d.ts +0 -39
- package/dist/modules/dev/dev-server/plugins/wss/web-socket-server.js +0 -47
- package/dist/modules/dev/dev-server/plugins/wss/web-socket-server.js.map +0 -1
- package/dist/modules/dev/dev-server/plugins/wss/wss.plugin.d.ts +0 -24
- package/dist/modules/dev/dev-server/plugins/wss/wss.plugin.js +0 -56
- package/dist/modules/dev/dev-server/plugins/wss/wss.plugin.js.map +0 -1
- package/dist/modules/dev/dev-server/sybmolicate/sybmolicate.plugin.d.ts +0 -7
- package/dist/modules/dev/dev-server/sybmolicate/sybmolicate.plugin.js +0 -41
- package/dist/modules/dev/dev-server/sybmolicate/sybmolicate.plugin.js.map +0 -1
- package/dist/modules/dev/dev-server/sybmolicate/types.d.ts +0 -64
- package/dist/modules/dev/dev-server/sybmolicate/types.js +0 -3
- package/dist/modules/dev/dev-server/sybmolicate/types.js.map +0 -1
- package/dist/modules/dev/terminal/base.terminal.reporter.d.ts +0 -25
- package/dist/modules/dev/terminal/base.terminal.reporter.js +0 -79
- package/dist/modules/dev/terminal/base.terminal.reporter.js.map +0 -1
- package/dist/modules/dev/terminal/terminal.reporter.d.ts +0 -13
- package/dist/modules/dev/terminal/terminal.reporter.js +0 -83
- package/dist/modules/dev/terminal/terminal.reporter.js.map +0 -1
- package/dist/modules/dev/types.d.ts +0 -20
- package/dist/modules/dev/types.js +0 -3
- package/dist/modules/dev/types.js.map +0 -1
- package/dist/modules/dev/utils/log.d.ts +0 -23
- package/dist/modules/dev/utils/log.js +0 -74
- package/dist/modules/dev/utils/log.js.map +0 -1
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Router Component
|
|
3
|
+
*
|
|
4
|
+
* Renders the navigation structure based on the file-based routes.
|
|
5
|
+
* This creates a stack navigator with tabs nested inside.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { View } from "react-native";
|
|
10
|
+
import { createNativeStackNavigator } from "@react-navigation/native-stack";
|
|
11
|
+
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
|
12
|
+
import { Text } from "@/components/ui";
|
|
13
|
+
|
|
14
|
+
// Import screen definitions
|
|
15
|
+
import HomeScreen from "@/routes/(tabs)/home";
|
|
16
|
+
import ExploreScreen from "@/routes/(tabs)/explore";
|
|
17
|
+
import ProfileScreen from "@/routes/(tabs)/profile";
|
|
18
|
+
import SettingsScreen from "@/routes/settings";
|
|
19
|
+
|
|
20
|
+
// Create navigators
|
|
21
|
+
const Stack = createNativeStackNavigator();
|
|
22
|
+
const Tab = createBottomTabNavigator();
|
|
23
|
+
|
|
24
|
+
// Theme colors using CSS variable-friendly values
|
|
25
|
+
const theme = {
|
|
26
|
+
primary: "hsl(221, 83%, 53%)",
|
|
27
|
+
background: "hsl(0, 0%, 100%)",
|
|
28
|
+
foreground: "hsl(224, 71%, 4%)",
|
|
29
|
+
muted: "hsl(220, 14%, 96%)",
|
|
30
|
+
mutedForeground: "hsl(220, 9%, 46%)",
|
|
31
|
+
border: "hsl(220, 13%, 91%)",
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Tab Icon Component
|
|
36
|
+
*/
|
|
37
|
+
function TabIcon({ icon, focused }: { icon: string; focused: boolean }): React.JSX.Element {
|
|
38
|
+
return (
|
|
39
|
+
<View className={`items-center justify-center ${focused ? "opacity-100" : "opacity-50"}`}>
|
|
40
|
+
<Text className="text-xl">{icon}</Text>
|
|
41
|
+
</View>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Tab Navigator
|
|
47
|
+
*
|
|
48
|
+
* Bottom tabs with Home, Explore, and Profile screens.
|
|
49
|
+
*/
|
|
50
|
+
function TabNavigator(): React.JSX.Element {
|
|
51
|
+
return (
|
|
52
|
+
<Tab.Navigator
|
|
53
|
+
screenOptions={{
|
|
54
|
+
headerShown: true,
|
|
55
|
+
tabBarActiveTintColor: theme.primary,
|
|
56
|
+
tabBarInactiveTintColor: theme.mutedForeground,
|
|
57
|
+
tabBarStyle: {
|
|
58
|
+
backgroundColor: theme.background,
|
|
59
|
+
borderTopColor: theme.border,
|
|
60
|
+
borderTopWidth: 1,
|
|
61
|
+
},
|
|
62
|
+
headerStyle: {
|
|
63
|
+
backgroundColor: theme.background,
|
|
64
|
+
},
|
|
65
|
+
headerTitleStyle: {
|
|
66
|
+
color: theme.foreground,
|
|
67
|
+
fontWeight: "600",
|
|
68
|
+
},
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
71
|
+
<Tab.Screen
|
|
72
|
+
name="home"
|
|
73
|
+
component={HomeScreen.component}
|
|
74
|
+
options={{
|
|
75
|
+
title: "Home",
|
|
76
|
+
tabBarLabel: "Home",
|
|
77
|
+
tabBarIcon: ({ focused }) => <TabIcon icon="🏠" focused={focused} />,
|
|
78
|
+
}}
|
|
79
|
+
/>
|
|
80
|
+
<Tab.Screen
|
|
81
|
+
name="explore"
|
|
82
|
+
component={ExploreScreen.component}
|
|
83
|
+
options={{
|
|
84
|
+
title: "Explore",
|
|
85
|
+
tabBarLabel: "Explore",
|
|
86
|
+
tabBarIcon: ({ focused }) => <TabIcon icon="🔍" focused={focused} />,
|
|
87
|
+
}}
|
|
88
|
+
/>
|
|
89
|
+
<Tab.Screen
|
|
90
|
+
name="profile"
|
|
91
|
+
component={ProfileScreen.component}
|
|
92
|
+
options={{
|
|
93
|
+
title: "Profile",
|
|
94
|
+
tabBarLabel: "Profile",
|
|
95
|
+
tabBarIcon: ({ focused }) => <TabIcon icon="👤" focused={focused} />,
|
|
96
|
+
}}
|
|
97
|
+
/>
|
|
98
|
+
</Tab.Navigator>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Root Router
|
|
104
|
+
*
|
|
105
|
+
* Stack navigator with tabs as the initial route.
|
|
106
|
+
*/
|
|
107
|
+
export function Router(): React.JSX.Element {
|
|
108
|
+
return (
|
|
109
|
+
<Stack.Navigator
|
|
110
|
+
initialRouteName="(tabs)"
|
|
111
|
+
screenOptions={{
|
|
112
|
+
headerShown: false,
|
|
113
|
+
animation: "slide_from_right",
|
|
114
|
+
contentStyle: {
|
|
115
|
+
backgroundColor: theme.background,
|
|
116
|
+
},
|
|
117
|
+
}}
|
|
118
|
+
>
|
|
119
|
+
<Stack.Screen name="(tabs)" component={TabNavigator} />
|
|
120
|
+
<Stack.Screen
|
|
121
|
+
name="settings"
|
|
122
|
+
component={SettingsScreen.component}
|
|
123
|
+
options={{
|
|
124
|
+
title: "Settings",
|
|
125
|
+
headerShown: true,
|
|
126
|
+
headerStyle: {
|
|
127
|
+
backgroundColor: theme.background,
|
|
128
|
+
},
|
|
129
|
+
headerTitleStyle: {
|
|
130
|
+
color: theme.foreground,
|
|
131
|
+
fontWeight: "600",
|
|
132
|
+
},
|
|
133
|
+
}}
|
|
134
|
+
/>
|
|
135
|
+
</Stack.Navigator>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App Providers
|
|
3
|
+
*
|
|
4
|
+
* Composes all application providers.
|
|
5
|
+
* Add new providers here to wrap the entire app.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { NavigationProvider } from "@/navigation";
|
|
10
|
+
|
|
11
|
+
interface AppProvidersProps {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function AppProviders({ children }: AppProvidersProps): React.JSX.Element {
|
|
16
|
+
return (
|
|
17
|
+
<NavigationProvider>
|
|
18
|
+
{/* Add additional providers here in order of dependency */}
|
|
19
|
+
{/* Example:
|
|
20
|
+
<ThemeProvider>
|
|
21
|
+
<AuthProvider>
|
|
22
|
+
{children}
|
|
23
|
+
</AuthProvider>
|
|
24
|
+
</ThemeProvider>
|
|
25
|
+
*/}
|
|
26
|
+
{children}
|
|
27
|
+
</NavigationProvider>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tabs Layout
|
|
3
|
+
*
|
|
4
|
+
* Defines the bottom tab navigation with three screens:
|
|
5
|
+
* - Home: Main dashboard/landing screen
|
|
6
|
+
* - Explore: Discovery and search functionality
|
|
7
|
+
* - Profile: User profile and settings access
|
|
8
|
+
*
|
|
9
|
+
* Theme colors are defined using HSL values that match the global.css theme.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { defineLayout } from "@teardown/navigation/primitives";
|
|
13
|
+
|
|
14
|
+
// Theme colors matching global.css
|
|
15
|
+
const theme = {
|
|
16
|
+
primary: "hsl(221, 83%, 53%)",
|
|
17
|
+
background: "hsl(0, 0%, 100%)",
|
|
18
|
+
foreground: "hsl(224, 71%, 4%)",
|
|
19
|
+
mutedForeground: "hsl(220, 9%, 46%)",
|
|
20
|
+
border: "hsl(220, 13%, 91%)",
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default defineLayout({
|
|
24
|
+
type: "tabs",
|
|
25
|
+
screenOptions: {
|
|
26
|
+
headerShown: true,
|
|
27
|
+
tabBarActiveTintColor: theme.primary,
|
|
28
|
+
tabBarInactiveTintColor: theme.mutedForeground,
|
|
29
|
+
tabBarStyle: {
|
|
30
|
+
backgroundColor: theme.background,
|
|
31
|
+
borderTopColor: theme.border,
|
|
32
|
+
borderTopWidth: 1,
|
|
33
|
+
},
|
|
34
|
+
headerStyle: {
|
|
35
|
+
backgroundColor: theme.background,
|
|
36
|
+
},
|
|
37
|
+
headerTitleStyle: {
|
|
38
|
+
color: theme.foreground,
|
|
39
|
+
fontWeight: "600",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explore Screen
|
|
3
|
+
*
|
|
4
|
+
* Discovery and search functionality screen.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React, { useState } from "react";
|
|
8
|
+
import { View, ScrollView, Pressable } from "react-native";
|
|
9
|
+
import { defineScreen } from "@teardown/navigation/primitives";
|
|
10
|
+
import {
|
|
11
|
+
Text,
|
|
12
|
+
Input,
|
|
13
|
+
Card,
|
|
14
|
+
CardHeader,
|
|
15
|
+
CardTitle,
|
|
16
|
+
CardDescription,
|
|
17
|
+
CardContent,
|
|
18
|
+
Badge,
|
|
19
|
+
} from "@/components/ui";
|
|
20
|
+
|
|
21
|
+
interface Category {
|
|
22
|
+
id: string;
|
|
23
|
+
title: string;
|
|
24
|
+
description: string;
|
|
25
|
+
icon: string;
|
|
26
|
+
color: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const categories: Category[] = [
|
|
30
|
+
{
|
|
31
|
+
id: "1",
|
|
32
|
+
title: "Getting Started",
|
|
33
|
+
description: "Learn the basics of your new app",
|
|
34
|
+
icon: "🚀",
|
|
35
|
+
color: "bg-blue-500/10",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "2",
|
|
39
|
+
title: "Documentation",
|
|
40
|
+
description: "Read the full documentation",
|
|
41
|
+
icon: "📚",
|
|
42
|
+
color: "bg-green-500/10",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "3",
|
|
46
|
+
title: "Examples",
|
|
47
|
+
description: "Browse example implementations",
|
|
48
|
+
icon: "💡",
|
|
49
|
+
color: "bg-yellow-500/10",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "4",
|
|
53
|
+
title: "Community",
|
|
54
|
+
description: "Join the community discussions",
|
|
55
|
+
icon: "👥",
|
|
56
|
+
color: "bg-purple-500/10",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "5",
|
|
60
|
+
title: "Templates",
|
|
61
|
+
description: "Start with pre-built templates",
|
|
62
|
+
icon: "📋",
|
|
63
|
+
color: "bg-pink-500/10",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "6",
|
|
67
|
+
title: "Integrations",
|
|
68
|
+
description: "Connect with other services",
|
|
69
|
+
icon: "🔗",
|
|
70
|
+
color: "bg-orange-500/10",
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
function ExploreScreen(): React.JSX.Element {
|
|
75
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
76
|
+
|
|
77
|
+
const filteredCategories = categories.filter(
|
|
78
|
+
(cat) =>
|
|
79
|
+
cat.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
|
80
|
+
cat.description.toLowerCase().includes(searchQuery.toLowerCase())
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<View className="flex-1 bg-background">
|
|
85
|
+
{/* Search Header */}
|
|
86
|
+
<View className="px-6 py-4 border-b border-border">
|
|
87
|
+
<Input
|
|
88
|
+
placeholder="Search categories..."
|
|
89
|
+
value={searchQuery}
|
|
90
|
+
onChangeText={setSearchQuery}
|
|
91
|
+
/>
|
|
92
|
+
</View>
|
|
93
|
+
|
|
94
|
+
<ScrollView className="flex-1" contentContainerClassName="p-6 gap-6">
|
|
95
|
+
{/* Section Header */}
|
|
96
|
+
<View className="gap-2">
|
|
97
|
+
<Text variant="h2">Explore</Text>
|
|
98
|
+
<Text variant="muted">Discover new content and features</Text>
|
|
99
|
+
</View>
|
|
100
|
+
|
|
101
|
+
{/* Popular Tags */}
|
|
102
|
+
<View className="gap-3">
|
|
103
|
+
<Text variant="label">POPULAR TAGS</Text>
|
|
104
|
+
<View className="flex-row flex-wrap gap-2">
|
|
105
|
+
<Badge variant="secondary">React Native</Badge>
|
|
106
|
+
<Badge variant="secondary">Navigation</Badge>
|
|
107
|
+
<Badge variant="secondary">TypeScript</Badge>
|
|
108
|
+
<Badge variant="secondary">Tailwind</Badge>
|
|
109
|
+
<Badge variant="outline">Animations</Badge>
|
|
110
|
+
<Badge variant="outline">State</Badge>
|
|
111
|
+
</View>
|
|
112
|
+
</View>
|
|
113
|
+
|
|
114
|
+
{/* Categories Grid */}
|
|
115
|
+
<View className="gap-4">
|
|
116
|
+
<Text variant="label">CATEGORIES</Text>
|
|
117
|
+
<View className="gap-3">
|
|
118
|
+
{filteredCategories.map((category) => (
|
|
119
|
+
<CategoryCard key={category.id} category={category} />
|
|
120
|
+
))}
|
|
121
|
+
</View>
|
|
122
|
+
</View>
|
|
123
|
+
|
|
124
|
+
{filteredCategories.length === 0 && (
|
|
125
|
+
<View className="items-center py-8">
|
|
126
|
+
<Text className="text-4xl mb-4">🔍</Text>
|
|
127
|
+
<Text variant="large">No results found</Text>
|
|
128
|
+
<Text variant="muted">Try a different search term</Text>
|
|
129
|
+
</View>
|
|
130
|
+
)}
|
|
131
|
+
</ScrollView>
|
|
132
|
+
</View>
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function CategoryCard({ category }: { category: Category }): React.JSX.Element {
|
|
137
|
+
return (
|
|
138
|
+
<Pressable>
|
|
139
|
+
<Card>
|
|
140
|
+
<CardContent className="flex-row items-center gap-4 py-4">
|
|
141
|
+
<View className={`h-12 w-12 items-center justify-center rounded-xl ${category.color}`}>
|
|
142
|
+
<Text className="text-2xl">{category.icon}</Text>
|
|
143
|
+
</View>
|
|
144
|
+
<View className="flex-1">
|
|
145
|
+
<CardTitle className="text-base">{category.title}</CardTitle>
|
|
146
|
+
<CardDescription>{category.description}</CardDescription>
|
|
147
|
+
</View>
|
|
148
|
+
<Text className="text-muted-foreground">›</Text>
|
|
149
|
+
</CardContent>
|
|
150
|
+
</Card>
|
|
151
|
+
</Pressable>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export default defineScreen({
|
|
156
|
+
component: ExploreScreen,
|
|
157
|
+
options: {
|
|
158
|
+
title: "Explore",
|
|
159
|
+
tabBarLabel: "Explore",
|
|
160
|
+
},
|
|
161
|
+
});
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Home Screen
|
|
3
|
+
*
|
|
4
|
+
* The main landing screen of the app.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { View, ScrollView, Pressable } from "react-native";
|
|
9
|
+
import { defineScreen } from "@teardown/navigation/primitives";
|
|
10
|
+
import { useTypedNavigation } from "@teardown/navigation/hooks";
|
|
11
|
+
import {
|
|
12
|
+
Text,
|
|
13
|
+
Button,
|
|
14
|
+
Card,
|
|
15
|
+
CardHeader,
|
|
16
|
+
CardTitle,
|
|
17
|
+
CardDescription,
|
|
18
|
+
CardContent,
|
|
19
|
+
Badge,
|
|
20
|
+
} from "@/components/ui";
|
|
21
|
+
|
|
22
|
+
function HomeScreen(): React.JSX.Element {
|
|
23
|
+
const navigation = useTypedNavigation();
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<ScrollView className="flex-1 bg-background" contentContainerClassName="p-6 gap-6">
|
|
27
|
+
{/* Hero Section */}
|
|
28
|
+
<View className="items-center gap-4 py-8">
|
|
29
|
+
<View className="h-20 w-20 items-center justify-center rounded-2xl bg-primary">
|
|
30
|
+
<Text className="text-3xl font-bold text-primary-foreground">T</Text>
|
|
31
|
+
</View>
|
|
32
|
+
<View className="items-center gap-2">
|
|
33
|
+
<Text variant="h1" className="text-center">
|
|
34
|
+
Welcome to <%= appName %>
|
|
35
|
+
</Text>
|
|
36
|
+
<Text variant="lead" className="text-center">
|
|
37
|
+
Your React Native app with type-safe navigation
|
|
38
|
+
</Text>
|
|
39
|
+
</View>
|
|
40
|
+
</View>
|
|
41
|
+
|
|
42
|
+
{/* Quick Actions */}
|
|
43
|
+
<Card>
|
|
44
|
+
<CardHeader>
|
|
45
|
+
<CardTitle>Quick Actions</CardTitle>
|
|
46
|
+
<CardDescription>Navigate through your app</CardDescription>
|
|
47
|
+
</CardHeader>
|
|
48
|
+
<CardContent className="gap-3">
|
|
49
|
+
<Button onPress={() => navigation.navigate("/settings")} fullWidth>
|
|
50
|
+
Open Settings
|
|
51
|
+
</Button>
|
|
52
|
+
<Button variant="secondary" onPress={() => navigation.navigate("/(tabs)/explore")} fullWidth>
|
|
53
|
+
Explore Content
|
|
54
|
+
</Button>
|
|
55
|
+
</CardContent>
|
|
56
|
+
</Card>
|
|
57
|
+
|
|
58
|
+
{/* Features */}
|
|
59
|
+
<View className="gap-4">
|
|
60
|
+
<Text variant="h3">Features</Text>
|
|
61
|
+
<FeatureCard
|
|
62
|
+
icon="🔒"
|
|
63
|
+
title="Type-Safe Navigation"
|
|
64
|
+
description="Routes are fully typed with TypeScript"
|
|
65
|
+
tags={["TypeScript", "Safe"]}
|
|
66
|
+
/>
|
|
67
|
+
<FeatureCard
|
|
68
|
+
icon="📁"
|
|
69
|
+
title="File-Based Routing"
|
|
70
|
+
description="Routes generated from file structure"
|
|
71
|
+
tags={["Auto", "Generated"]}
|
|
72
|
+
/>
|
|
73
|
+
<FeatureCard
|
|
74
|
+
icon="📱"
|
|
75
|
+
title="Tab Navigation"
|
|
76
|
+
description="Bottom tabs with Home, Explore, Profile"
|
|
77
|
+
tags={["Tabs", "Navigate"]}
|
|
78
|
+
/>
|
|
79
|
+
</View>
|
|
80
|
+
|
|
81
|
+
{/* Getting Started */}
|
|
82
|
+
<Card className="bg-primary/5 border-primary/20">
|
|
83
|
+
<CardContent className="py-4">
|
|
84
|
+
<Text variant="large">Getting Started</Text>
|
|
85
|
+
<Text variant="muted" className="mt-2">
|
|
86
|
+
1. Explore the tabs to see different screens{"\n"}
|
|
87
|
+
2. Open Settings to see stack navigation{"\n"}
|
|
88
|
+
3. Customize screens in src/routes/{"\n"}
|
|
89
|
+
4. Build your app!
|
|
90
|
+
</Text>
|
|
91
|
+
</CardContent>
|
|
92
|
+
</Card>
|
|
93
|
+
</ScrollView>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function FeatureCard({
|
|
98
|
+
icon,
|
|
99
|
+
title,
|
|
100
|
+
description,
|
|
101
|
+
tags,
|
|
102
|
+
}: {
|
|
103
|
+
icon: string;
|
|
104
|
+
title: string;
|
|
105
|
+
description: string;
|
|
106
|
+
tags: string[];
|
|
107
|
+
}): React.JSX.Element {
|
|
108
|
+
return (
|
|
109
|
+
<Card>
|
|
110
|
+
<CardHeader className="flex-row items-start gap-3 pb-2">
|
|
111
|
+
<View className="h-10 w-10 items-center justify-center rounded-lg bg-muted">
|
|
112
|
+
<Text className="text-xl">{icon}</Text>
|
|
113
|
+
</View>
|
|
114
|
+
<View className="flex-1">
|
|
115
|
+
<CardTitle className="text-base">{title}</CardTitle>
|
|
116
|
+
<CardDescription>{description}</CardDescription>
|
|
117
|
+
</View>
|
|
118
|
+
</CardHeader>
|
|
119
|
+
<CardContent>
|
|
120
|
+
<View className="flex-row flex-wrap gap-2">
|
|
121
|
+
{tags.map((tag) => (
|
|
122
|
+
<Badge key={tag} variant="secondary">
|
|
123
|
+
{tag}
|
|
124
|
+
</Badge>
|
|
125
|
+
))}
|
|
126
|
+
</View>
|
|
127
|
+
</CardContent>
|
|
128
|
+
</Card>
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export default defineScreen({
|
|
133
|
+
component: HomeScreen,
|
|
134
|
+
options: {
|
|
135
|
+
title: "Home",
|
|
136
|
+
tabBarLabel: "Home",
|
|
137
|
+
},
|
|
138
|
+
});
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Screen
|
|
3
|
+
*
|
|
4
|
+
* User profile and account management screen.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { View, ScrollView, Pressable } from "react-native";
|
|
9
|
+
import { defineScreen } from "@teardown/navigation/primitives";
|
|
10
|
+
import { useTypedNavigation } from "@teardown/navigation/hooks";
|
|
11
|
+
import {
|
|
12
|
+
Text,
|
|
13
|
+
Button,
|
|
14
|
+
Avatar,
|
|
15
|
+
Card,
|
|
16
|
+
CardContent,
|
|
17
|
+
Badge,
|
|
18
|
+
Separator,
|
|
19
|
+
} from "@/components/ui";
|
|
20
|
+
|
|
21
|
+
function ProfileScreen(): React.JSX.Element {
|
|
22
|
+
const navigation = useTypedNavigation();
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<ScrollView className="flex-1 bg-background" contentContainerClassName="p-6 gap-6">
|
|
26
|
+
{/* Profile Header */}
|
|
27
|
+
<View className="items-center gap-4 py-4">
|
|
28
|
+
<Avatar fallback="U" size="xl" />
|
|
29
|
+
<View className="items-center gap-1">
|
|
30
|
+
<Text variant="h2">User</Text>
|
|
31
|
+
<Text variant="muted">user@example.com</Text>
|
|
32
|
+
</View>
|
|
33
|
+
<View className="flex-row gap-2">
|
|
34
|
+
<Badge variant="secondary">Free Plan</Badge>
|
|
35
|
+
<Badge variant="outline">Member since 2024</Badge>
|
|
36
|
+
</View>
|
|
37
|
+
</View>
|
|
38
|
+
|
|
39
|
+
{/* Stats */}
|
|
40
|
+
<Card>
|
|
41
|
+
<CardContent className="flex-row justify-around py-4">
|
|
42
|
+
<StatItem label="Projects" value="12" />
|
|
43
|
+
<Separator orientation="vertical" />
|
|
44
|
+
<StatItem label="Tasks" value="48" />
|
|
45
|
+
<Separator orientation="vertical" />
|
|
46
|
+
<StatItem label="Completed" value="36" />
|
|
47
|
+
</CardContent>
|
|
48
|
+
</Card>
|
|
49
|
+
|
|
50
|
+
{/* Account Section */}
|
|
51
|
+
<View className="gap-2">
|
|
52
|
+
<Text variant="label" className="px-1">ACCOUNT</Text>
|
|
53
|
+
<Card>
|
|
54
|
+
<CardContent className="p-0">
|
|
55
|
+
<MenuItem
|
|
56
|
+
icon="⚙️"
|
|
57
|
+
title="Settings"
|
|
58
|
+
onPress={() => navigation.navigate("/settings")}
|
|
59
|
+
/>
|
|
60
|
+
<Separator />
|
|
61
|
+
<MenuItem
|
|
62
|
+
icon="🔒"
|
|
63
|
+
title="Privacy"
|
|
64
|
+
onPress={() => {}}
|
|
65
|
+
/>
|
|
66
|
+
<Separator />
|
|
67
|
+
<MenuItem
|
|
68
|
+
icon="🔔"
|
|
69
|
+
title="Notifications"
|
|
70
|
+
onPress={() => {}}
|
|
71
|
+
/>
|
|
72
|
+
</CardContent>
|
|
73
|
+
</Card>
|
|
74
|
+
</View>
|
|
75
|
+
|
|
76
|
+
{/* Support Section */}
|
|
77
|
+
<View className="gap-2">
|
|
78
|
+
<Text variant="label" className="px-1">SUPPORT</Text>
|
|
79
|
+
<Card>
|
|
80
|
+
<CardContent className="p-0">
|
|
81
|
+
<MenuItem
|
|
82
|
+
icon="❓"
|
|
83
|
+
title="Help Center"
|
|
84
|
+
onPress={() => {}}
|
|
85
|
+
/>
|
|
86
|
+
<Separator />
|
|
87
|
+
<MenuItem
|
|
88
|
+
icon="💬"
|
|
89
|
+
title="Contact Us"
|
|
90
|
+
onPress={() => {}}
|
|
91
|
+
/>
|
|
92
|
+
<Separator />
|
|
93
|
+
<MenuItem
|
|
94
|
+
icon="📝"
|
|
95
|
+
title="Send Feedback"
|
|
96
|
+
onPress={() => {}}
|
|
97
|
+
/>
|
|
98
|
+
</CardContent>
|
|
99
|
+
</Card>
|
|
100
|
+
</View>
|
|
101
|
+
|
|
102
|
+
{/* Sign Out */}
|
|
103
|
+
<Button variant="destructive" onPress={() => {}} fullWidth>
|
|
104
|
+
Sign Out
|
|
105
|
+
</Button>
|
|
106
|
+
|
|
107
|
+
{/* App Info */}
|
|
108
|
+
<View className="items-center pt-4">
|
|
109
|
+
<Text variant="muted">Version 1.0.0</Text>
|
|
110
|
+
</View>
|
|
111
|
+
</ScrollView>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function StatItem({ label, value }: { label: string; value: string }): React.JSX.Element {
|
|
116
|
+
return (
|
|
117
|
+
<View className="items-center px-4">
|
|
118
|
+
<Text variant="h3">{value}</Text>
|
|
119
|
+
<Text variant="muted">{label}</Text>
|
|
120
|
+
</View>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function MenuItem({
|
|
125
|
+
icon,
|
|
126
|
+
title,
|
|
127
|
+
onPress,
|
|
128
|
+
}: {
|
|
129
|
+
icon: string;
|
|
130
|
+
title: string;
|
|
131
|
+
onPress: () => void;
|
|
132
|
+
}): React.JSX.Element {
|
|
133
|
+
return (
|
|
134
|
+
<Pressable
|
|
135
|
+
className="flex-row items-center px-4 py-3 active:bg-muted/50"
|
|
136
|
+
onPress={onPress}
|
|
137
|
+
>
|
|
138
|
+
<Text className="text-xl mr-3">{icon}</Text>
|
|
139
|
+
<Text variant="large" className="flex-1">{title}</Text>
|
|
140
|
+
<Text className="text-muted-foreground">›</Text>
|
|
141
|
+
</Pressable>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export default defineScreen({
|
|
146
|
+
component: ProfileScreen,
|
|
147
|
+
options: {
|
|
148
|
+
title: "Profile",
|
|
149
|
+
tabBarLabel: "Profile",
|
|
150
|
+
},
|
|
151
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Root Stack Layout
|
|
3
|
+
*
|
|
4
|
+
* Defines the root navigation structure using a stack navigator.
|
|
5
|
+
* The tabs group is nested inside this stack, allowing for
|
|
6
|
+
* full-screen modals and other stack-based navigation.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { defineLayout } from "@teardown/navigation/primitives";
|
|
10
|
+
|
|
11
|
+
export default defineLayout({
|
|
12
|
+
type: "stack",
|
|
13
|
+
initialRouteName: "(tabs)",
|
|
14
|
+
screenOptions: {
|
|
15
|
+
headerShown: false,
|
|
16
|
+
animation: "slide_from_right",
|
|
17
|
+
},
|
|
18
|
+
});
|