From 5786b14b36c8d75d59e2a72b792008e244e8efde Mon Sep 17 00:00:00 2001 From: Thomas Schleicher Date: Wed, 29 Nov 2023 10:40:36 +0100 Subject: [PATCH 1/7] feat: Add new files Added .gitignore with patterns for ignoring files and directories, including node_modules, .expo, dist, web-build, *.orig.*, *.jks, *.p8, *.p12, *.key, *.mobileprovision, .metro-health-check*, npm-debug.*, yarn-debug.*, yarn-error.*, .DS_Store, *.pem, .env*.local, *.tsbuildinfo, expo-env.d.ts, and @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb. Added app.json with Expo configurations, including name, slug, version, orientation, icon, scheme, userInterfaceStyle, splash, assetBundlePatterns, ios, android, web, plugins, and experiments. Added _layout.tsx with TabLayout component for rendering tabs. Imported FontAwesome and expo-router. Exported ErrorBoundary and unstable_settings. Added index.tsx with TabOneScreen component for rendering Tab One. Imported EditScreenInfo, Text, and View from components/Themed. Added two.tsx with TabTwoScreen component for rendering Tab Two. Imported EditScreenInfo, Text, and View from components/Themed. Added +html.tsx for configuring root HTML during static rendering. Imported ScrollViewStyleReset from expo-router/html. Added [...missing].tsx for rendering NotFoundScreen. Imported Link and Stack from expo-router. Imported StyleSheet, Text, and View from components/Themed. Added _layout.tsx for configuring the root layout. Imported FontAwesome and expo-router. Imported DarkTheme and DefaultTheme from @react-navigation/native. Imported useFonts from expo-font. Imported SplashScreen and Stack from expo-router. Imported useEffect and useColorScheme from react-native. Added modal.tsx with ModalScreen component for rendering Modal. Imported StatusBar from expo-status-bar and StyleSheet from react-native. Added babel.config.js with presets babel-preset-expo and plugins expo-router/babel. Added EditScreenInfo.tsx with EditScreenInfo component for displaying information about the code. Imported React and StyleSheet from react-native. Imported Colors from constants/Colors. Imported ExternalLink from components/ExternalLink. Imported MonoText from components/StyledText. Imported Text and View from components/Themed. --- .gitignore | 41 + app.json | 39 + app/(tabs)/_layout.tsx | 55 + app/(tabs)/index.tsx | 31 + app/(tabs)/two.tsx | 31 + app/+html.tsx | 46 + app/[...missing].tsx | 40 + app/_layout.tsx | 56 + app/modal.tsx | 35 + assets/fonts/SpaceMono-Regular.ttf | Bin 0 -> 93252 bytes assets/images/adaptive-icon.png | Bin 0 -> 17547 bytes assets/images/favicon.png | Bin 0 -> 1466 bytes assets/images/icon.png | Bin 0 -> 22380 bytes assets/images/splash.png | Bin 0 -> 47346 bytes babel.config.js | 10 + components/EditScreenInfo.tsx | 77 + components/ExternalLink.tsx | 28 + components/StyledText.tsx | 5 + components/Themed.tsx | 44 + components/__tests__/StyledText-test.js | 10 + constants/Colors.ts | 19 + metro.config.js | 10 + package-lock.json | 17639 ++++++++++++++++++++++ package.json | 49 + tsconfig.json | 12 + 25 files changed, 18277 insertions(+) create mode 100644 .gitignore create mode 100644 app.json create mode 100644 app/(tabs)/_layout.tsx create mode 100644 app/(tabs)/index.tsx create mode 100644 app/(tabs)/two.tsx create mode 100644 app/+html.tsx create mode 100644 app/[...missing].tsx create mode 100644 app/_layout.tsx create mode 100644 app/modal.tsx create mode 100755 assets/fonts/SpaceMono-Regular.ttf create mode 100644 assets/images/adaptive-icon.png create mode 100644 assets/images/favicon.png create mode 100644 assets/images/icon.png create mode 100644 assets/images/splash.png create mode 100644 babel.config.js create mode 100644 components/EditScreenInfo.tsx create mode 100644 components/ExternalLink.tsx create mode 100644 components/StyledText.tsx create mode 100644 components/Themed.tsx create mode 100644 components/__tests__/StyledText-test.js create mode 100644 constants/Colors.ts create mode 100644 metro.config.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b37b6e --- /dev/null +++ b/.gitignore @@ -0,0 +1,41 @@ +# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files + +# dependencies +node_modules/ + +# Expo +.expo/ +dist/ +web-build/ + +# Native +*.orig.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision + +# Metro +.metro-health-check* + +# debug +npm-debug.* +yarn-debug.* +yarn-error.* + +# macOS +.DS_Store +*.pem + +# local env files +.env*.local + +# typescript +*.tsbuildinfo + +# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb +# The following patterns were generated by expo-cli + +expo-env.d.ts +# @end expo-cli \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..6ee3c16 --- /dev/null +++ b/app.json @@ -0,0 +1,39 @@ +{ + "expo": { + "name": "interaktive-systeme", + "slug": "interaktive-systeme", + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/images/icon.png", + "scheme": "myapp", + "userInterfaceStyle": "automatic", + "splash": { + "image": "./assets/images/splash.png", + "resizeMode": "contain", + "backgroundColor": "#ffffff" + }, + "assetBundlePatterns": [ + "**/*" + ], + "ios": { + "supportsTablet": true + }, + "android": { + "adaptiveIcon": { + "foregroundImage": "./assets/images/adaptive-icon.png", + "backgroundColor": "#ffffff" + } + }, + "web": { + "bundler": "metro", + "output": "static", + "favicon": "./assets/images/favicon.png" + }, + "plugins": [ + "expo-router" + ], + "experiments": { + "typedRoutes": true + } + } +} diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx new file mode 100644 index 0000000..8c47578 --- /dev/null +++ b/app/(tabs)/_layout.tsx @@ -0,0 +1,55 @@ +import FontAwesome from '@expo/vector-icons/FontAwesome'; +import { Link, Tabs } from 'expo-router'; +import { Pressable, useColorScheme } from 'react-native'; + +import Colors from '../../constants/Colors'; + +/** + * You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/ + */ +function TabBarIcon(props: { + name: React.ComponentProps['name']; + color: string; +}) { + return ; +} + +export default function TabLayout() { + const colorScheme = useColorScheme(); + + return ( + + , + headerRight: () => ( + + + {({ pressed }) => ( + + )} + + + ), + }} + /> + , + }} + /> + + ); +} diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx new file mode 100644 index 0000000..ea48da0 --- /dev/null +++ b/app/(tabs)/index.tsx @@ -0,0 +1,31 @@ +import { StyleSheet } from 'react-native'; + +import EditScreenInfo from '../../components/EditScreenInfo'; +import { Text, View } from '../../components/Themed'; + +export default function TabOneScreen() { + return ( + + Tab One + + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + title: { + fontSize: 20, + fontWeight: 'bold', + }, + separator: { + marginVertical: 30, + height: 1, + width: '80%', + }, +}); diff --git a/app/(tabs)/two.tsx b/app/(tabs)/two.tsx new file mode 100644 index 0000000..5ecef25 --- /dev/null +++ b/app/(tabs)/two.tsx @@ -0,0 +1,31 @@ +import { StyleSheet } from 'react-native'; + +import EditScreenInfo from '../../components/EditScreenInfo'; +import { Text, View } from '../../components/Themed'; + +export default function TabTwoScreen() { + return ( + + Tab Two + + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + title: { + fontSize: 20, + fontWeight: 'bold', + }, + separator: { + marginVertical: 30, + height: 1, + width: '80%', + }, +}); diff --git a/app/+html.tsx b/app/+html.tsx new file mode 100644 index 0000000..25524d7 --- /dev/null +++ b/app/+html.tsx @@ -0,0 +1,46 @@ +import { ScrollViewStyleReset } from 'expo-router/html'; + +// This file is web-only and used to configure the root HTML for every +// web page during static rendering. +// The contents of this function only run in Node.js environments and +// do not have access to the DOM or browser APIs. +export default function Root({ children }: { children: React.ReactNode }) { + return ( + + + + + + {/* + This viewport disables scaling which makes the mobile website act more like a native app. + However this does reduce built-in accessibility. If you want to enable scaling, use this instead: + + */} + + {/* + Disable body scrolling on web. This makes ScrollView components work closer to how they do on native. + However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line. + */} + + + {/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */} +