create-croissant 0.1.38 → 0.1.40

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 (155) hide show
  1. package/package.json +9 -9
  2. package/template/README.md +4 -4
  3. package/template/apps/desktop/electron-builder.yml +6 -6
  4. package/template/apps/desktop/electron.vite.config.ts +8 -8
  5. package/template/apps/desktop/package.json +5 -5
  6. package/template/apps/desktop/src/main/index.ts +32 -32
  7. package/template/apps/desktop/src/preload/index.d.ts +3 -3
  8. package/template/apps/desktop/src/preload/index.ts +8 -8
  9. package/template/apps/desktop/src/renderer/src/App.tsx +5 -5
  10. package/template/apps/desktop/src/renderer/src/assets/base.css +4 -4
  11. package/template/apps/desktop/src/renderer/src/assets/main.css +3 -3
  12. package/template/apps/desktop/src/renderer/src/components/Versions.tsx +4 -4
  13. package/template/apps/desktop/src/renderer/src/main.tsx +7 -7
  14. package/template/apps/desktop/tsconfig.json +1 -4
  15. package/template/apps/desktop/tsconfig.node.json +7 -1
  16. package/template/apps/desktop/tsconfig.web.json +3 -9
  17. package/template/apps/mobile/app/(tabs)/_layout.tsx +11 -10
  18. package/template/apps/mobile/app/(tabs)/explore.tsx +29 -27
  19. package/template/apps/mobile/app/(tabs)/index.tsx +25 -24
  20. package/template/apps/mobile/app/_layout.tsx +8 -8
  21. package/template/apps/mobile/app/modal.tsx +6 -6
  22. package/template/apps/mobile/components/external-link.tsx +5 -5
  23. package/template/apps/mobile/components/haptic-tab.tsx +4 -4
  24. package/template/apps/mobile/components/hello-wave.tsx +5 -4
  25. package/template/apps/mobile/components/parallax-scroll-view.tsx +15 -13
  26. package/template/apps/mobile/components/themed-text.tsx +14 -14
  27. package/template/apps/mobile/components/themed-view.tsx +3 -3
  28. package/template/apps/mobile/components/ui/collapsible.tsx +14 -13
  29. package/template/apps/mobile/components/ui/icon-symbol.ios.tsx +4 -4
  30. package/template/apps/mobile/components/ui/icon-symbol.tsx +9 -9
  31. package/template/apps/mobile/constants/theme.ts +19 -19
  32. package/template/apps/mobile/hooks/use-color-scheme.ts +1 -1
  33. package/template/apps/mobile/hooks/use-color-scheme.web.ts +3 -3
  34. package/template/apps/mobile/hooks/use-theme-color.ts +4 -4
  35. package/template/apps/mobile/package.json +3 -3
  36. package/template/apps/mobile/scripts/reset-project.js +2 -2
  37. package/template/apps/mobile/tsconfig.json +2 -9
  38. package/template/apps/platform/drizzle.config.ts +5 -5
  39. package/template/apps/platform/package.json +4 -4
  40. package/template/apps/platform/src/components/app-sidebar.tsx +60 -69
  41. package/template/apps/platform/src/components/login-form.tsx +32 -39
  42. package/template/apps/platform/src/components/search-form.tsx +5 -13
  43. package/template/apps/platform/src/components/signup-form.tsx +39 -49
  44. package/template/apps/platform/src/components/version-switcher.tsx +11 -21
  45. package/template/apps/platform/src/lib/auth-utils.ts +12 -14
  46. package/template/apps/platform/src/lib/orpc.ts +17 -17
  47. package/template/apps/platform/src/router.tsx +5 -5
  48. package/template/apps/platform/src/routes/__root.tsx +13 -15
  49. package/template/apps/platform/src/routes/_auth/account.tsx +61 -50
  50. package/template/apps/platform/src/routes/_auth/dashboard.tsx +17 -17
  51. package/template/apps/platform/src/routes/_auth/examples/client-orpc-auth.tsx +13 -13
  52. package/template/apps/platform/src/routes/_auth/examples/ssr-orpc-auth.tsx +16 -16
  53. package/template/apps/platform/src/routes/_auth.tsx +5 -5
  54. package/template/apps/platform/src/routes/_public/examples/client-orpc.tsx +108 -88
  55. package/template/apps/platform/src/routes/_public/examples/isr.tsx +14 -14
  56. package/template/apps/platform/src/routes/_public/examples/ssr-orpc.tsx +92 -75
  57. package/template/apps/platform/src/routes/_public/index.tsx +22 -19
  58. package/template/apps/platform/src/routes/_public/login.tsx +4 -4
  59. package/template/apps/platform/src/routes/_public/signup.tsx +6 -5
  60. package/template/apps/platform/src/routes/_public.tsx +5 -5
  61. package/template/apps/platform/src/routes/api/auth/$.ts +13 -13
  62. package/template/apps/platform/src/routes/api/rpc.$.ts +13 -13
  63. package/template/apps/platform/vite.config.ts +8 -8
  64. package/template/docker-compose.yml +1 -1
  65. package/template/package.json +24 -26
  66. package/template/packages/auth/package.json +9 -9
  67. package/template/packages/auth/src/lib/auth.ts +1 -1
  68. package/template/packages/db/package.json +7 -7
  69. package/template/packages/db/src/index.ts +4 -4
  70. package/template/packages/db/src/schema.ts +2 -2
  71. package/template/packages/orpc/package.json +6 -6
  72. package/template/packages/orpc/src/lib/planets.ts +39 -43
  73. package/template/packages/orpc/src/lib/router.ts +15 -15
  74. package/template/packages/ui/package.json +10 -10
  75. package/template/packages/ui/src/components/accordion.tsx +20 -22
  76. package/template/packages/ui/src/components/alert-dialog.tsx +31 -56
  77. package/template/packages/ui/src/components/alert.tsx +15 -23
  78. package/template/packages/ui/src/components/aspect-ratio.tsx +3 -3
  79. package/template/packages/ui/src/components/avatar.tsx +19 -35
  80. package/template/packages/ui/src/components/badge.tsx +13 -17
  81. package/template/packages/ui/src/components/breadcrumb.tsx +22 -44
  82. package/template/packages/ui/src/components/button-group.tsx +16 -25
  83. package/template/packages/ui/src/components/button.tsx +8 -9
  84. package/template/packages/ui/src/components/calendar.tsx +43 -82
  85. package/template/packages/ui/src/components/card.tsx +15 -26
  86. package/template/packages/ui/src/components/carousel.tsx +70 -78
  87. package/template/packages/ui/src/components/chart.tsx +84 -117
  88. package/template/packages/ui/src/components/checkbox.tsx +8 -9
  89. package/template/packages/ui/src/components/collapsible.tsx +5 -9
  90. package/template/packages/ui/src/components/combobox.tsx +44 -68
  91. package/template/packages/ui/src/components/command.tsx +32 -47
  92. package/template/packages/ui/src/components/context-menu.tsx +45 -71
  93. package/template/packages/ui/src/components/dialog.tsx +29 -51
  94. package/template/packages/ui/src/components/direction.tsx +1 -4
  95. package/template/packages/ui/src/components/drawer.tsx +24 -38
  96. package/template/packages/ui/src/components/dropdown-menu.tsx +45 -55
  97. package/template/packages/ui/src/components/empty.tsx +16 -27
  98. package/template/packages/ui/src/components/field.tsx +49 -63
  99. package/template/packages/ui/src/components/hover-card.tsx +9 -14
  100. package/template/packages/ui/src/components/input-group.tsx +40 -52
  101. package/template/packages/ui/src/components/input-otp.tsx +17 -18
  102. package/template/packages/ui/src/components/input.tsx +6 -6
  103. package/template/packages/ui/src/components/item.tsx +31 -44
  104. package/template/packages/ui/src/components/kbd.tsx +5 -5
  105. package/template/packages/ui/src/components/label.tsx +6 -6
  106. package/template/packages/ui/src/components/menubar.tsx +51 -64
  107. package/template/packages/ui/src/components/mode-toggle.tsx +9 -15
  108. package/template/packages/ui/src/components/native-select.tsx +18 -24
  109. package/template/packages/ui/src/components/navigation-menu.tsx +28 -35
  110. package/template/packages/ui/src/components/pagination.tsx +19 -31
  111. package/template/packages/ui/src/components/popover.tsx +13 -26
  112. package/template/packages/ui/src/components/progress.tsx +13 -30
  113. package/template/packages/ui/src/components/radio-group.tsx +7 -7
  114. package/template/packages/ui/src/components/resizable.tsx +12 -20
  115. package/template/packages/ui/src/components/scroll-area.tsx +8 -12
  116. package/template/packages/ui/src/components/select.tsx +31 -42
  117. package/template/packages/ui/src/components/separator.tsx +6 -10
  118. package/template/packages/ui/src/components/sheet.tsx +25 -38
  119. package/template/packages/ui/src/components/sidebar.tsx +137 -170
  120. package/template/packages/ui/src/components/skeleton.tsx +3 -3
  121. package/template/packages/ui/src/components/slider.tsx +5 -5
  122. package/template/packages/ui/src/components/sonner.tsx +20 -24
  123. package/template/packages/ui/src/components/spinner.tsx +10 -5
  124. package/template/packages/ui/src/components/switch.tsx +6 -6
  125. package/template/packages/ui/src/components/table.tsx +18 -45
  126. package/template/packages/ui/src/components/tabs.tsx +14 -22
  127. package/template/packages/ui/src/components/textarea.tsx +5 -5
  128. package/template/packages/ui/src/components/theme-provider.tsx +43 -48
  129. package/template/packages/ui/src/components/toggle-group.tsx +18 -20
  130. package/template/packages/ui/src/components/toggle.tsx +9 -10
  131. package/template/packages/ui/src/components/tooltip.tsx +10 -22
  132. package/template/packages/ui/src/hooks/use-mobile.ts +11 -11
  133. package/template/packages/ui/src/lib/utils.ts +4 -4
  134. package/template/packages/ui/src/styles/globals.css +106 -106
  135. package/template/turbo.json +15 -6
  136. package/template/.prettierignore +0 -10
  137. package/template/apps/desktop/.prettierignore +0 -6
  138. package/template/apps/desktop/eslint.config.ts +0 -11
  139. package/template/apps/desktop/prettier.config.ts +0 -3
  140. package/template/apps/mobile/eslint.config.js +0 -10
  141. package/template/apps/platform/eslint.config.ts +0 -11
  142. package/template/apps/platform/prettier.config.ts +0 -3
  143. package/template/packages/auth/eslint.config.ts +0 -3
  144. package/template/packages/auth/prettier.config.ts +0 -3
  145. package/template/packages/config-eslint/index.ts +0 -24
  146. package/template/packages/config-eslint/package.json +0 -11
  147. package/template/packages/config-prettier/index.ts +0 -14
  148. package/template/packages/config-prettier/package.json +0 -7
  149. package/template/packages/db/eslint.config.ts +0 -3
  150. package/template/packages/db/prettier.config.ts +0 -3
  151. package/template/packages/orpc/eslint.config.ts +0 -3
  152. package/template/packages/orpc/prettier.config.ts +0 -3
  153. package/template/packages/ui/eslint.config.ts +0 -3
  154. package/template/packages/ui/prettier.config.ts +0 -3
  155. package/template/prettier.config.ts +0 -15
@@ -1,22 +1,23 @@
1
- import { Image } from 'expo-image';
2
- import { Platform, StyleSheet } from 'react-native';
1
+ import { Image } from "expo-image";
2
+ import { Platform, StyleSheet } from "react-native";
3
3
 
4
- import { HelloWave } from '@/components/hello-wave';
5
- import ParallaxScrollView from '@/components/parallax-scroll-view';
6
- import { ThemedText } from '@/components/themed-text';
7
- import { ThemedView } from '@/components/themed-view';
8
- import { Link } from 'expo-router';
4
+ import { HelloWave } from "@/components/hello-wave";
5
+ import ParallaxScrollView from "@/components/parallax-scroll-view";
6
+ import { ThemedText } from "@/components/themed-text";
7
+ import { ThemedView } from "@/components/themed-view";
8
+ import { Link } from "expo-router";
9
9
 
10
10
  export default function HomeScreen() {
11
11
  return (
12
12
  <ParallaxScrollView
13
- headerBackgroundColor={{ light: '#A1CEDC', dark: '#1D3D47' }}
13
+ headerBackgroundColor={{ light: "#A1CEDC", dark: "#1D3D47" }}
14
14
  headerImage={
15
15
  <Image
16
- source={require('@/assets/images/partial-react-logo.png')}
16
+ source={require("@/assets/images/partial-react-logo.png")}
17
17
  style={styles.reactLogo}
18
18
  />
19
- }>
19
+ }
20
+ >
20
21
  <ThemedView style={styles.titleContainer}>
21
22
  <ThemedText type="title">Welcome!</ThemedText>
22
23
  <HelloWave />
@@ -25,14 +26,14 @@ export default function HomeScreen() {
25
26
  <ThemedText type="subtitle">Step 1: Try it</ThemedText>
26
27
  <ThemedText>
27
28
  Edit <ThemedText type="defaultSemiBold">app/(tabs)/index.tsx</ThemedText> to see changes.
28
- Press{' '}
29
+ Press{" "}
29
30
  <ThemedText type="defaultSemiBold">
30
31
  {Platform.select({
31
- ios: 'cmd + d',
32
- android: 'cmd + m',
33
- web: 'F12',
32
+ ios: "cmd + d",
33
+ android: "cmd + m",
34
+ web: "F12",
34
35
  })}
35
- </ThemedText>{' '}
36
+ </ThemedText>{" "}
36
37
  to open developer tools.
37
38
  </ThemedText>
38
39
  </ThemedView>
@@ -43,18 +44,18 @@ export default function HomeScreen() {
43
44
  </Link.Trigger>
44
45
  <Link.Preview />
45
46
  <Link.Menu>
46
- <Link.MenuAction title="Action" icon="cube" onPress={() => alert('Action pressed')} />
47
+ <Link.MenuAction title="Action" icon="cube" onPress={() => alert("Action pressed")} />
47
48
  <Link.MenuAction
48
49
  title="Share"
49
50
  icon="square.and.arrow.up"
50
- onPress={() => alert('Share pressed')}
51
+ onPress={() => alert("Share pressed")}
51
52
  />
52
53
  <Link.Menu title="More" icon="ellipsis">
53
54
  <Link.MenuAction
54
55
  title="Delete"
55
56
  icon="trash"
56
57
  destructive
57
- onPress={() => alert('Delete pressed')}
58
+ onPress={() => alert("Delete pressed")}
58
59
  />
59
60
  </Link.Menu>
60
61
  </Link.Menu>
@@ -68,9 +69,9 @@ export default function HomeScreen() {
68
69
  <ThemedText type="subtitle">Step 3: Get a fresh start</ThemedText>
69
70
  <ThemedText>
70
71
  {`When you're ready, run `}
71
- <ThemedText type="defaultSemiBold">npm run reset-project</ThemedText> to get a fresh{' '}
72
- <ThemedText type="defaultSemiBold">app</ThemedText> directory. This will move the current{' '}
73
- <ThemedText type="defaultSemiBold">app</ThemedText> to{' '}
72
+ <ThemedText type="defaultSemiBold">npm run reset-project</ThemedText> to get a fresh{" "}
73
+ <ThemedText type="defaultSemiBold">app</ThemedText> directory. This will move the current{" "}
74
+ <ThemedText type="defaultSemiBold">app</ThemedText> to{" "}
74
75
  <ThemedText type="defaultSemiBold">app-example</ThemedText>.
75
76
  </ThemedText>
76
77
  </ThemedView>
@@ -80,8 +81,8 @@ export default function HomeScreen() {
80
81
 
81
82
  const styles = StyleSheet.create({
82
83
  titleContainer: {
83
- flexDirection: 'row',
84
- alignItems: 'center',
84
+ flexDirection: "row",
85
+ alignItems: "center",
85
86
  gap: 8,
86
87
  },
87
88
  stepContainer: {
@@ -93,6 +94,6 @@ const styles = StyleSheet.create({
93
94
  width: 290,
94
95
  bottom: 0,
95
96
  left: 0,
96
- position: 'absolute',
97
+ position: "absolute",
97
98
  },
98
99
  });
@@ -1,22 +1,22 @@
1
- import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';
2
- import { Stack } from 'expo-router';
3
- import { StatusBar } from 'expo-status-bar';
4
- import 'react-native-reanimated';
1
+ import { DarkTheme, DefaultTheme, ThemeProvider } from "@react-navigation/native";
2
+ import { Stack } from "expo-router";
3
+ import { StatusBar } from "expo-status-bar";
4
+ import "react-native-reanimated";
5
5
 
6
- import { useColorScheme } from '@/hooks/use-color-scheme';
6
+ import { useColorScheme } from "@/hooks/use-color-scheme";
7
7
 
8
8
  export const unstable_settings = {
9
- anchor: '(tabs)',
9
+ anchor: "(tabs)",
10
10
  };
11
11
 
12
12
  export default function RootLayout() {
13
13
  const colorScheme = useColorScheme();
14
14
 
15
15
  return (
16
- <ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
16
+ <ThemeProvider value={colorScheme === "dark" ? DarkTheme : DefaultTheme}>
17
17
  <Stack>
18
18
  <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
19
- <Stack.Screen name="modal" options={{ presentation: 'modal', title: 'Modal' }} />
19
+ <Stack.Screen name="modal" options={{ presentation: "modal", title: "Modal" }} />
20
20
  </Stack>
21
21
  <StatusBar style="auto" />
22
22
  </ThemeProvider>
@@ -1,8 +1,8 @@
1
- import { Link } from 'expo-router';
2
- import { StyleSheet } from 'react-native';
1
+ import { Link } from "expo-router";
2
+ import { StyleSheet } from "react-native";
3
3
 
4
- import { ThemedText } from '@/components/themed-text';
5
- import { ThemedView } from '@/components/themed-view';
4
+ import { ThemedText } from "@/components/themed-text";
5
+ import { ThemedView } from "@/components/themed-view";
6
6
 
7
7
  export default function ModalScreen() {
8
8
  return (
@@ -18,8 +18,8 @@ export default function ModalScreen() {
18
18
  const styles = StyleSheet.create({
19
19
  container: {
20
20
  flex: 1,
21
- alignItems: 'center',
22
- justifyContent: 'center',
21
+ alignItems: "center",
22
+ justifyContent: "center",
23
23
  padding: 20,
24
24
  },
25
25
  link: {
@@ -1,8 +1,8 @@
1
- import { Href, Link } from 'expo-router';
2
- import { openBrowserAsync, WebBrowserPresentationStyle } from 'expo-web-browser';
3
- import { type ComponentProps } from 'react';
1
+ import { Href, Link } from "expo-router";
2
+ import { openBrowserAsync, WebBrowserPresentationStyle } from "expo-web-browser";
3
+ import { type ComponentProps } from "react";
4
4
 
5
- type Props = Omit<ComponentProps<typeof Link>, 'href'> & { href: Href & string };
5
+ type Props = Omit<ComponentProps<typeof Link>, "href"> & { href: Href & string };
6
6
 
7
7
  export function ExternalLink({ href, ...rest }: Props) {
8
8
  return (
@@ -11,7 +11,7 @@ export function ExternalLink({ href, ...rest }: Props) {
11
11
  {...rest}
12
12
  href={href}
13
13
  onPress={async (event) => {
14
- if (process.env.EXPO_OS !== 'web') {
14
+ if (process.env.EXPO_OS !== "web") {
15
15
  // Prevent the default behavior of linking to the default browser on native.
16
16
  event.preventDefault();
17
17
  // Open the link in an in-app browser.
@@ -1,13 +1,13 @@
1
- import { BottomTabBarButtonProps } from '@react-navigation/bottom-tabs';
2
- import { PlatformPressable } from '@react-navigation/elements';
3
- import * as Haptics from 'expo-haptics';
1
+ import { BottomTabBarButtonProps } from "@react-navigation/bottom-tabs";
2
+ import { PlatformPressable } from "@react-navigation/elements";
3
+ import * as Haptics from "expo-haptics";
4
4
 
5
5
  export function HapticTab(props: BottomTabBarButtonProps) {
6
6
  return (
7
7
  <PlatformPressable
8
8
  {...props}
9
9
  onPressIn={(ev) => {
10
- if (process.env.EXPO_OS === 'ios') {
10
+ if (process.env.EXPO_OS === "ios") {
11
11
  // Add a soft haptic feedback when pressing down on the tabs.
12
12
  Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
13
13
  }
@@ -1,4 +1,4 @@
1
- import Animated from 'react-native-reanimated';
1
+ import Animated from "react-native-reanimated";
2
2
 
3
3
  export function HelloWave() {
4
4
  return (
@@ -8,11 +8,12 @@ export function HelloWave() {
8
8
  lineHeight: 32,
9
9
  marginTop: -6,
10
10
  animationName: {
11
- '50%': { transform: [{ rotate: '25deg' }] },
11
+ "50%": { transform: [{ rotate: "25deg" }] },
12
12
  },
13
13
  animationIterationCount: 4,
14
- animationDuration: '300ms',
15
- }}>
14
+ animationDuration: "300ms",
15
+ }}
16
+ >
16
17
  👋
17
18
  </Animated.Text>
18
19
  );
@@ -1,15 +1,15 @@
1
- import type { PropsWithChildren, ReactElement } from 'react';
2
- import { StyleSheet } from 'react-native';
1
+ import type { PropsWithChildren, ReactElement } from "react";
2
+ import { StyleSheet } from "react-native";
3
3
  import Animated, {
4
4
  interpolate,
5
5
  useAnimatedRef,
6
6
  useAnimatedStyle,
7
7
  useScrollOffset,
8
- } from 'react-native-reanimated';
8
+ } from "react-native-reanimated";
9
9
 
10
- import { ThemedView } from '@/components/themed-view';
11
- import { useColorScheme } from '@/hooks/use-color-scheme';
12
- import { useThemeColor } from '@/hooks/use-theme-color';
10
+ import { ThemedView } from "@/components/themed-view";
11
+ import { useColorScheme } from "@/hooks/use-color-scheme";
12
+ import { useThemeColor } from "@/hooks/use-theme-color";
13
13
 
14
14
  const HEADER_HEIGHT = 250;
15
15
 
@@ -23,8 +23,8 @@ export default function ParallaxScrollView({
23
23
  headerImage,
24
24
  headerBackgroundColor,
25
25
  }: Props) {
26
- const backgroundColor = useThemeColor({}, 'background');
27
- const colorScheme = useColorScheme() ?? 'light';
26
+ const backgroundColor = useThemeColor({}, "background");
27
+ const colorScheme = useColorScheme() ?? "light";
28
28
  const scrollRef = useAnimatedRef<Animated.ScrollView>();
29
29
  const scrollOffset = useScrollOffset(scrollRef);
30
30
  const headerAnimatedStyle = useAnimatedStyle(() => {
@@ -34,7 +34,7 @@ export default function ParallaxScrollView({
34
34
  translateY: interpolate(
35
35
  scrollOffset.value,
36
36
  [-HEADER_HEIGHT, 0, HEADER_HEIGHT],
37
- [-HEADER_HEIGHT / 2, 0, HEADER_HEIGHT * 0.75]
37
+ [-HEADER_HEIGHT / 2, 0, HEADER_HEIGHT * 0.75],
38
38
  ),
39
39
  },
40
40
  {
@@ -48,13 +48,15 @@ export default function ParallaxScrollView({
48
48
  <Animated.ScrollView
49
49
  ref={scrollRef}
50
50
  style={{ backgroundColor, flex: 1 }}
51
- scrollEventThrottle={16}>
51
+ scrollEventThrottle={16}
52
+ >
52
53
  <Animated.View
53
54
  style={[
54
55
  styles.header,
55
56
  { backgroundColor: headerBackgroundColor[colorScheme] },
56
57
  headerAnimatedStyle,
57
- ]}>
58
+ ]}
59
+ >
58
60
  {headerImage}
59
61
  </Animated.View>
60
62
  <ThemedView style={styles.content}>{children}</ThemedView>
@@ -68,12 +70,12 @@ const styles = StyleSheet.create({
68
70
  },
69
71
  header: {
70
72
  height: HEADER_HEIGHT,
71
- overflow: 'hidden',
73
+ overflow: "hidden",
72
74
  },
73
75
  content: {
74
76
  flex: 1,
75
77
  padding: 32,
76
78
  gap: 16,
77
- overflow: 'hidden',
79
+ overflow: "hidden",
78
80
  },
79
81
  });
@@ -1,31 +1,31 @@
1
- import { StyleSheet, Text, type TextProps } from 'react-native';
1
+ import { StyleSheet, Text, type TextProps } from "react-native";
2
2
 
3
- import { useThemeColor } from '@/hooks/use-theme-color';
3
+ import { useThemeColor } from "@/hooks/use-theme-color";
4
4
 
5
5
  export type ThemedTextProps = TextProps & {
6
6
  lightColor?: string;
7
7
  darkColor?: string;
8
- type?: 'default' | 'title' | 'defaultSemiBold' | 'subtitle' | 'link';
8
+ type?: "default" | "title" | "defaultSemiBold" | "subtitle" | "link";
9
9
  };
10
10
 
11
11
  export function ThemedText({
12
12
  style,
13
13
  lightColor,
14
14
  darkColor,
15
- type = 'default',
15
+ type = "default",
16
16
  ...rest
17
17
  }: ThemedTextProps) {
18
- const color = useThemeColor({ light: lightColor, dark: darkColor }, 'text');
18
+ const color = useThemeColor({ light: lightColor, dark: darkColor }, "text");
19
19
 
20
20
  return (
21
21
  <Text
22
22
  style={[
23
23
  { color },
24
- type === 'default' ? styles.default : undefined,
25
- type === 'title' ? styles.title : undefined,
26
- type === 'defaultSemiBold' ? styles.defaultSemiBold : undefined,
27
- type === 'subtitle' ? styles.subtitle : undefined,
28
- type === 'link' ? styles.link : undefined,
24
+ type === "default" ? styles.default : undefined,
25
+ type === "title" ? styles.title : undefined,
26
+ type === "defaultSemiBold" ? styles.defaultSemiBold : undefined,
27
+ type === "subtitle" ? styles.subtitle : undefined,
28
+ type === "link" ? styles.link : undefined,
29
29
  style,
30
30
  ]}
31
31
  {...rest}
@@ -41,20 +41,20 @@ const styles = StyleSheet.create({
41
41
  defaultSemiBold: {
42
42
  fontSize: 16,
43
43
  lineHeight: 24,
44
- fontWeight: '600',
44
+ fontWeight: "600",
45
45
  },
46
46
  title: {
47
47
  fontSize: 32,
48
- fontWeight: 'bold',
48
+ fontWeight: "bold",
49
49
  lineHeight: 32,
50
50
  },
51
51
  subtitle: {
52
52
  fontSize: 20,
53
- fontWeight: 'bold',
53
+ fontWeight: "bold",
54
54
  },
55
55
  link: {
56
56
  lineHeight: 30,
57
57
  fontSize: 16,
58
- color: '#0a7ea4',
58
+ color: "#0a7ea4",
59
59
  },
60
60
  });
@@ -1,6 +1,6 @@
1
- import { View, type ViewProps } from 'react-native';
1
+ import { View, type ViewProps } from "react-native";
2
2
 
3
- import { useThemeColor } from '@/hooks/use-theme-color';
3
+ import { useThemeColor } from "@/hooks/use-theme-color";
4
4
 
5
5
  export type ThemedViewProps = ViewProps & {
6
6
  lightColor?: string;
@@ -8,7 +8,7 @@ export type ThemedViewProps = ViewProps & {
8
8
  };
9
9
 
10
10
  export function ThemedView({ style, lightColor, darkColor, ...otherProps }: ThemedViewProps) {
11
- const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background');
11
+ const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, "background");
12
12
 
13
13
  return <View style={[{ backgroundColor }, style]} {...otherProps} />;
14
14
  }
@@ -1,28 +1,29 @@
1
- import { PropsWithChildren, useState } from 'react';
2
- import { StyleSheet, TouchableOpacity } from 'react-native';
1
+ import { PropsWithChildren, useState } from "react";
2
+ import { StyleSheet, TouchableOpacity } from "react-native";
3
3
 
4
- import { ThemedText } from '@/components/themed-text';
5
- import { ThemedView } from '@/components/themed-view';
6
- import { IconSymbol } from '@/components/ui/icon-symbol';
7
- import { Colors } from '@/constants/theme';
8
- import { useColorScheme } from '@/hooks/use-color-scheme';
4
+ import { ThemedText } from "@/components/themed-text";
5
+ import { ThemedView } from "@/components/themed-view";
6
+ import { IconSymbol } from "@/components/ui/icon-symbol";
7
+ import { Colors } from "@/constants/theme";
8
+ import { useColorScheme } from "@/hooks/use-color-scheme";
9
9
 
10
10
  export function Collapsible({ children, title }: PropsWithChildren & { title: string }) {
11
11
  const [isOpen, setIsOpen] = useState(false);
12
- const theme = useColorScheme() ?? 'light';
12
+ const theme = useColorScheme() ?? "light";
13
13
 
14
14
  return (
15
15
  <ThemedView>
16
16
  <TouchableOpacity
17
17
  style={styles.heading}
18
18
  onPress={() => setIsOpen((value) => !value)}
19
- activeOpacity={0.8}>
19
+ activeOpacity={0.8}
20
+ >
20
21
  <IconSymbol
21
22
  name="chevron.right"
22
23
  size={18}
23
24
  weight="medium"
24
- color={theme === 'light' ? Colors.light.icon : Colors.dark.icon}
25
- style={{ transform: [{ rotate: isOpen ? '90deg' : '0deg' }] }}
25
+ color={theme === "light" ? Colors.light.icon : Colors.dark.icon}
26
+ style={{ transform: [{ rotate: isOpen ? "90deg" : "0deg" }] }}
26
27
  />
27
28
 
28
29
  <ThemedText type="defaultSemiBold">{title}</ThemedText>
@@ -34,8 +35,8 @@ export function Collapsible({ children, title }: PropsWithChildren & { title: st
34
35
 
35
36
  const styles = StyleSheet.create({
36
37
  heading: {
37
- flexDirection: 'row',
38
- alignItems: 'center',
38
+ flexDirection: "row",
39
+ alignItems: "center",
39
40
  gap: 6,
40
41
  },
41
42
  content: {
@@ -1,14 +1,14 @@
1
- import { SymbolView, SymbolViewProps, SymbolWeight } from 'expo-symbols';
2
- import { StyleProp, ViewStyle } from 'react-native';
1
+ import { SymbolView, SymbolViewProps, SymbolWeight } from "expo-symbols";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
3
 
4
4
  export function IconSymbol({
5
5
  name,
6
6
  size = 24,
7
7
  color,
8
8
  style,
9
- weight = 'regular',
9
+ weight = "regular",
10
10
  }: {
11
- name: SymbolViewProps['name'];
11
+ name: SymbolViewProps["name"];
12
12
  size?: number;
13
13
  color: string;
14
14
  style?: StyleProp<ViewStyle>;
@@ -1,11 +1,11 @@
1
1
  // Fallback for using MaterialIcons on Android and web.
2
2
 
3
- import MaterialIcons from '@expo/vector-icons/MaterialIcons';
4
- import { SymbolWeight, SymbolViewProps } from 'expo-symbols';
5
- import { ComponentProps } from 'react';
6
- import { OpaqueColorValue, type StyleProp, type TextStyle } from 'react-native';
3
+ import MaterialIcons from "@expo/vector-icons/MaterialIcons";
4
+ import { SymbolWeight, SymbolViewProps } from "expo-symbols";
5
+ import { ComponentProps } from "react";
6
+ import { OpaqueColorValue, type StyleProp, type TextStyle } from "react-native";
7
7
 
8
- type IconMapping = Record<SymbolViewProps['name'], ComponentProps<typeof MaterialIcons>['name']>;
8
+ type IconMapping = Record<SymbolViewProps["name"], ComponentProps<typeof MaterialIcons>["name"]>;
9
9
  type IconSymbolName = keyof typeof MAPPING;
10
10
 
11
11
  /**
@@ -14,10 +14,10 @@ type IconSymbolName = keyof typeof MAPPING;
14
14
  * - see SF Symbols in the [SF Symbols](https://developer.apple.com/sf-symbols/) app.
15
15
  */
16
16
  const MAPPING = {
17
- 'house.fill': 'home',
18
- 'paperplane.fill': 'send',
19
- 'chevron.left.forwardslash.chevron.right': 'code',
20
- 'chevron.right': 'chevron-right',
17
+ "house.fill": "home",
18
+ "paperplane.fill": "send",
19
+ "chevron.left.forwardslash.chevron.right": "code",
20
+ "chevron.right": "chevron-right",
21
21
  } as IconMapping;
22
22
 
23
23
  /**
@@ -3,26 +3,26 @@
3
3
  * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
4
4
  */
5
5
 
6
- import { Platform } from 'react-native';
6
+ import { Platform } from "react-native";
7
7
 
8
- const tintColorLight = '#0a7ea4';
9
- const tintColorDark = '#fff';
8
+ const tintColorLight = "#0a7ea4";
9
+ const tintColorDark = "#fff";
10
10
 
11
11
  export const Colors = {
12
12
  light: {
13
- text: '#11181C',
14
- background: '#fff',
13
+ text: "#11181C",
14
+ background: "#fff",
15
15
  tint: tintColorLight,
16
- icon: '#687076',
17
- tabIconDefault: '#687076',
16
+ icon: "#687076",
17
+ tabIconDefault: "#687076",
18
18
  tabIconSelected: tintColorLight,
19
19
  },
20
20
  dark: {
21
- text: '#ECEDEE',
22
- background: '#151718',
21
+ text: "#ECEDEE",
22
+ background: "#151718",
23
23
  tint: tintColorDark,
24
- icon: '#9BA1A6',
25
- tabIconDefault: '#9BA1A6',
24
+ icon: "#9BA1A6",
25
+ tabIconDefault: "#9BA1A6",
26
26
  tabIconSelected: tintColorDark,
27
27
  },
28
28
  };
@@ -30,19 +30,19 @@ export const Colors = {
30
30
  export const Fonts = Platform.select({
31
31
  ios: {
32
32
  /** iOS `UIFontDescriptorSystemDesignDefault` */
33
- sans: 'system-ui',
33
+ sans: "system-ui",
34
34
  /** iOS `UIFontDescriptorSystemDesignSerif` */
35
- serif: 'ui-serif',
35
+ serif: "ui-serif",
36
36
  /** iOS `UIFontDescriptorSystemDesignRounded` */
37
- rounded: 'ui-rounded',
37
+ rounded: "ui-rounded",
38
38
  /** iOS `UIFontDescriptorSystemDesignMonospaced` */
39
- mono: 'ui-monospace',
39
+ mono: "ui-monospace",
40
40
  },
41
41
  default: {
42
- sans: 'normal',
43
- serif: 'serif',
44
- rounded: 'normal',
45
- mono: 'monospace',
42
+ sans: "normal",
43
+ serif: "serif",
44
+ rounded: "normal",
45
+ mono: "monospace",
46
46
  },
47
47
  web: {
48
48
  sans: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
@@ -1 +1 @@
1
- export { useColorScheme } from 'react-native';
1
+ export { useColorScheme } from "react-native";
@@ -1,5 +1,5 @@
1
- import { useEffect, useState } from 'react';
2
- import { useColorScheme as useRNColorScheme } from 'react-native';
1
+ import { useEffect, useState } from "react";
2
+ import { useColorScheme as useRNColorScheme } from "react-native";
3
3
 
4
4
  /**
5
5
  * To support static rendering, this value needs to be re-calculated on the client side for web
@@ -17,5 +17,5 @@ export function useColorScheme() {
17
17
  return colorScheme;
18
18
  }
19
19
 
20
- return 'light';
20
+ return "light";
21
21
  }
@@ -3,14 +3,14 @@
3
3
  * https://docs.expo.dev/guides/color-schemes/
4
4
  */
5
5
 
6
- import { Colors } from '@/constants/theme';
7
- import { useColorScheme } from '@/hooks/use-color-scheme';
6
+ import { Colors } from "@/constants/theme";
7
+ import { useColorScheme } from "@/hooks/use-color-scheme";
8
8
 
9
9
  export function useThemeColor(
10
10
  props: { light?: string; dark?: string },
11
- colorName: keyof typeof Colors.light & keyof typeof Colors.dark
11
+ colorName: keyof typeof Colors.light & keyof typeof Colors.dark,
12
12
  ) {
13
- const theme = useColorScheme() ?? 'light';
13
+ const theme = useColorScheme() ?? "light";
14
14
  const colorFromProps = props[theme];
15
15
 
16
16
  if (colorFromProps) {
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "mobile",
3
- "main": "expo-router/entry",
4
3
  "version": "1.0.0",
4
+ "private": true,
5
+ "main": "expo-router/entry",
5
6
  "scripts": {
6
7
  "dev": "expo start",
7
8
  "start": "expo start",
@@ -39,6 +40,5 @@
39
40
  },
40
41
  "devDependencies": {
41
42
  "eslint-config-expo": "~55.0.0"
42
- },
43
- "private": true
43
+ }
44
44
  }
@@ -91,7 +91,7 @@ const moveDirectories = async (userInput) => {
91
91
  userInput === "y"
92
92
  ? `\n3. Delete the /${exampleDir} directory when you're done referencing it.`
93
93
  : ""
94
- }`
94
+ }`,
95
95
  );
96
96
  } catch (error) {
97
97
  console.error(`❌ Error during script execution: ${error.message}`);
@@ -108,5 +108,5 @@ rl.question(
108
108
  console.log("❌ Invalid input. Please enter 'Y' or 'N'.");
109
109
  rl.close();
110
110
  }
111
- }
111
+ },
112
112
  );