create-disposabl-app 0.14.14 → 0.14.16

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 (31) hide show
  1. package/dist/disposabl.js +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/templates/default/AGENTS.md +1 -0
  4. package/dist/templates/default/apps/mobile/eslint.config.js +24 -0
  5. package/dist/templates/default/packages/disposabl-kit/mobile/billing/account-billing.tsx +15 -11
  6. package/dist/templates/default/packages/disposabl-kit/mobile/components/account-profile.tsx +8 -23
  7. package/dist/templates/default/packages/disposabl-kit/mobile/components/appearance-settings.tsx +39 -44
  8. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-form.tsx +20 -19
  9. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-ui.tsx +22 -100
  10. package/dist/templates/default/packages/disposabl-kit/mobile/components/email-verification.tsx +6 -6
  11. package/dist/templates/default/packages/disposabl-kit/mobile/components/google-button.tsx +3 -27
  12. package/dist/templates/default/packages/disposabl-kit/mobile/components/google-sign-in.tsx +3 -4
  13. package/dist/templates/default/packages/disposabl-kit/mobile/components/settings-page.tsx +12 -22
  14. package/dist/templates/default/packages/disposabl-kit/mobile/design/avatar.tsx +1 -1
  15. package/dist/templates/default/packages/disposabl-kit/mobile/design/brand-mark.tsx +2 -10
  16. package/dist/templates/default/packages/disposabl-kit/mobile/design/nativewind.ts +11 -0
  17. package/dist/templates/default/packages/disposabl-kit/mobile/design/preferences.tsx +30 -54
  18. package/dist/templates/default/packages/disposabl-kit/mobile/design/primitives.tsx +17 -39
  19. package/dist/templates/default/packages/disposabl-kit/mobile/design/themed-text.tsx +3 -5
  20. package/dist/templates/default/packages/disposabl-kit/mobile/global.css +1 -56
  21. package/dist/templates/default/packages/disposabl-kit/mobile/layout.tsx +7 -10
  22. package/dist/templates/default/packages/disposabl-kit/mobile/screens/account.tsx +3 -10
  23. package/dist/templates/default/packages/disposabl-kit/mobile/screens/change-password.tsx +13 -19
  24. package/dist/templates/default/packages/disposabl-kit/mobile/screens/forgot-password.tsx +17 -15
  25. package/dist/templates/default/packages/disposabl-kit/mobile/screens/home.tsx +75 -120
  26. package/dist/templates/default/packages/disposabl-kit/mobile/typography.css +59 -0
  27. package/dist/templates/default/packages/disposabl-kit/mobile/updates/update-prompt.tsx +69 -96
  28. package/dist/templates/default/packages/tests/components/mobile-google.test.mjs +1 -1
  29. package/dist/templates/default/packages/tests/components/mobile-updates.test.mjs +3 -1
  30. package/dist/templates/default/packages/tests/mobile-styling.test.ts +64 -0
  31. package/package.json +1 -1
@@ -3,7 +3,6 @@ import {
3
3
  Image,
4
4
  Platform,
5
5
  Pressable,
6
- StyleSheet,
7
6
  Text,
8
7
  useColorScheme,
9
8
  } from "react-native";
@@ -26,41 +25,18 @@ export function GoogleButton({
26
25
  accessibilityState={{ disabled: disabled || pending, busy: pending }}
27
26
  disabled={disabled || pending}
28
27
  onPress={onPress}
29
- style={({ pressed }) => [
30
- styles.button,
31
- {
32
- backgroundColor: dark ? "#131314" : "#FFFFFF",
33
- borderColor: dark ? "#8E918F" : "#747775",
34
- opacity: disabled || pending || pressed ? 0.6 : 1,
35
- },
36
- ]}
28
+ className={`min-h-[52px] flex-row items-center justify-center rounded-[12px] border border-[#747775] bg-white py-[14px] active:opacity-60 dark:border-[#8E918F] dark:bg-[#131314] ${Platform.OS === "ios" ? "gap-[12px] px-[16px]" : "gap-[10px] px-[12px]"} ${disabled || pending ? "opacity-60" : ""}`}
37
29
  >
38
30
  <Image
39
31
  source={require("../../lib/google-logo.png")}
40
- style={styles.logo}
32
+ className="size-[20px]"
41
33
  resizeMode="contain"
42
34
  accessible={false}
43
35
  />
44
- <Text style={[styles.label, { color }]}>
36
+ <Text className="text-[16px] font-medium text-[#1F1F1F] dark:text-[#E3E3E3]">
45
37
  {pending ? "Signing in..." : "Sign in with Google"}
46
38
  </Text>
47
39
  {pending && <ActivityIndicator color={color} />}
48
40
  </Pressable>
49
41
  );
50
42
  }
51
-
52
- const styles = StyleSheet.create({
53
- button: {
54
- minHeight: 52,
55
- borderWidth: 1,
56
- borderRadius: 12,
57
- flexDirection: "row",
58
- alignItems: "center",
59
- justifyContent: "center",
60
- gap: Platform.OS === "ios" ? 12 : 10,
61
- paddingHorizontal: Platform.OS === "ios" ? 16 : 12,
62
- paddingVertical: 14,
63
- },
64
- logo: { width: 20, height: 20 },
65
- label: { fontSize: 16, fontWeight: "500" },
66
- });
@@ -10,11 +10,10 @@ import {
10
10
  mobileAuthReturnUrl,
11
11
  } from "../../lib/mobile-auth";
12
12
  import { api } from "../lib/convex";
13
- import { useAuthStyles } from "./auth-ui";
13
+ import { authClasses } from "./auth-ui";
14
14
  import { GoogleButton } from "./google-button";
15
15
 
16
16
  export function GoogleSignIn({ disabled = false }: { disabled?: boolean }) {
17
- const styles = useAuthStyles();
18
17
  const { signIn } = useSignInWithGoogle(api.auth);
19
18
  const params = useLocalSearchParams<{
20
19
  returnTo?: string;
@@ -105,14 +104,14 @@ export function GoogleSignIn({ disabled = false }: { disabled?: boolean }) {
105
104
  }
106
105
 
107
106
  return (
108
- <View style={{ gap: 12 }}>
107
+ <View className="gap-[12px]">
109
108
  <GoogleButton
110
109
  pending={pending}
111
110
  disabled={disabled}
112
111
  onPress={() => void start()}
113
112
  />
114
113
  {error && (
115
- <Text accessibilityRole="alert" style={styles.error}>
114
+ <Text accessibilityRole="alert" className={authClasses.error}>
116
115
  {error}
117
116
  </Text>
118
117
  )}
@@ -1,3 +1,4 @@
1
+ import { VariableContextProvider } from "nativewind";
1
2
  import { router, Stack } from "expo-router";
2
3
  import type { ReactNode } from "react";
3
4
  import { Pressable, ScrollView, Text } from "react-native";
@@ -11,7 +12,6 @@ export function ScreenCloseButton({
11
12
  label: string;
12
13
  onPress: () => void;
13
14
  }) {
14
- const colors = usePreferenceColors();
15
15
  return process.env.EXPO_OS === "ios" ? (
16
16
  <Stack.Toolbar placement="right">
17
17
  <Stack.Toolbar.Button accessibilityLabel={label} onPress={onPress}>
@@ -28,14 +28,7 @@ export function ScreenCloseButton({
28
28
  hitSlop={12}
29
29
  onPress={onPress}
30
30
  >
31
- <Text
32
- style={{
33
- color: colors.text,
34
- fontSize: 16,
35
- fontWeight: "600",
36
- padding: 8,
37
- }}
38
- >
31
+ <Text className="text-[#18181b] dark:text-[#fafafa] text-[16px] font-semibold p-[8px]">
39
32
  Done
40
33
  </Text>
41
34
  </Pressable>
@@ -73,20 +66,17 @@ export function SettingsPage({
73
66
  }}
74
67
  />
75
68
  <ScreenCloseButton label="Close settings" onPress={onClose} />
76
- <ScrollView
77
- style={{ flex: 1, backgroundColor: colors.background }}
78
- contentInsetAdjustmentBehavior="automatic"
79
- contentContainerStyle={{
80
- paddingHorizontal: 20,
81
- paddingTop: 16,
82
- paddingBottom: inset.bottom + 32,
83
- width: "100%",
84
- maxWidth: 680,
85
- alignSelf: "center",
86
- }}
69
+ <VariableContextProvider
70
+ value={{ "--layout-padding-bottom": inset.bottom + 32 }}
87
71
  >
88
- {children}
89
- </ScrollView>
72
+ <ScrollView
73
+ className="flex-1 bg-[#fafafa] dark:bg-[#09090b]"
74
+ contentInsetAdjustmentBehavior="automatic"
75
+ contentContainerClassName="px-[20px] pt-[16px] pb-[var(--layout-padding-bottom)] w-[100%] max-w-[680px] self-center"
76
+ >
77
+ {children}
78
+ </ScrollView>
79
+ </VariableContextProvider>
90
80
  </>
91
81
  );
92
82
  }
@@ -20,7 +20,7 @@ export function Avatar({
20
20
  return source && failedSource !== source ? (
21
21
  <Image
22
22
  source={{ uri: source }}
23
- style={{ width: 92, height: 92, borderRadius: 46 }}
23
+ className="w-[92px] h-[92px] rounded-[46px]"
24
24
  accessibilityLabel={`${name}'s profile picture`}
25
25
  onError={() => setFailedSource(source)}
26
26
  />
@@ -7,15 +7,7 @@ export function BrandMark() {
7
7
  if (!appName) return null;
8
8
  if (appName !== "Disposabl")
9
9
  return (
10
- <Text
11
- style={{
12
- color: dark ? "#fff" : "#161b2e",
13
- fontSize: 22,
14
- fontWeight: "600",
15
- textAlign: "center",
16
- marginBottom: 12,
17
- }}
18
- >
10
+ <Text className="text-[#161b2e] dark:text-white text-[22px] font-semibold text-center mb-[12px]">
19
11
  {appName}
20
12
  </Text>
21
13
  );
@@ -28,7 +20,7 @@ export function BrandMark() {
28
20
  }
29
21
  accessibilityLabel="App logo"
30
22
  resizeMode="contain"
31
- style={{ width: 92, height: 92, alignSelf: "center", marginBottom: 12 }}
23
+ className="w-[92px] h-[92px] self-center mb-[12px]"
32
24
  />
33
25
  );
34
26
  }
@@ -0,0 +1,11 @@
1
+ import { styled } from "nativewind";
2
+ import { Host as ExpoHost } from "@expo/ui";
3
+ import { MenuView as ExpoMenuView } from "@expo/ui/community/menu";
4
+ import { GlassView as ExpoGlassView } from "expo-glass-effect";
5
+ import { SymbolView as ExpoSymbolView } from "expo-symbols";
6
+
7
+ // Native controls need explicit className-to-style mappings.
8
+ export const Host = styled(ExpoHost);
9
+ export const MenuView = styled(ExpoMenuView);
10
+ export const GlassView = styled(ExpoGlassView);
11
+ export const SymbolView = styled(ExpoSymbolView);
@@ -1,9 +1,10 @@
1
+ import { VariableContextProvider } from "nativewind";
1
2
  import {
2
- GlassView,
3
3
  isGlassEffectAPIAvailable,
4
4
  isLiquidGlassAvailable,
5
5
  } from "expo-glass-effect";
6
- import { SymbolView, type SymbolViewProps } from "expo-symbols";
6
+ import type { SymbolViewProps } from "expo-symbols";
7
+ import { GlassView, SymbolView } from "./nativewind";
7
8
  import type { ReactNode } from "react";
8
9
  import { Platform, Pressable, View } from "react-native";
9
10
  import { useResolvedColorScheme } from "./theme-provider";
@@ -29,13 +30,9 @@ export function PreferenceSection({
29
30
  title: string;
30
31
  children: ReactNode;
31
32
  }) {
32
- const colors = usePreferenceColors();
33
33
  return (
34
34
  <View className="mt-7">
35
- <ThemedText
36
- className="mb-3 ml-4"
37
- style={{ color: colors.secondary, fontSize: 19, fontWeight: "600" }}
38
- >
35
+ <ThemedText className="mb-3 ml-4 text-[#71717a] dark:text-[#a1a1aa] text-[19px] font-semibold">
39
36
  {title}
40
37
  </ThemedText>
41
38
  <PreferenceCard>{children}</PreferenceCard>
@@ -44,25 +41,15 @@ export function PreferenceSection({
44
41
  }
45
42
 
46
43
  export function PreferenceCard({ children }: { children: ReactNode }) {
47
- const colors = usePreferenceColors();
48
44
  return (
49
- <View
50
- className="overflow-hidden rounded-[24px]"
51
- style={{ backgroundColor: colors.card }}
52
- >
45
+ <View className="overflow-hidden rounded-[24px] bg-[#ffffff] dark:bg-[#18181b]">
53
46
  {children}
54
47
  </View>
55
48
  );
56
49
  }
57
50
 
58
51
  export function PreferenceSeparator() {
59
- const colors = usePreferenceColors();
60
- return (
61
- <View
62
- className="ml-[58px] h-px"
63
- style={{ backgroundColor: colors.separator }}
64
- />
65
- );
52
+ return <View className="ml-[58px] h-px bg-[#e4e4e7] dark:bg-[#27272a]" />;
66
53
  }
67
54
 
68
55
  export function PreferenceIcon({
@@ -124,14 +111,15 @@ export function PreferenceRow({
124
111
  const content = (
125
112
  <>
126
113
  <SymbolView name={icon} size={23} tintColor={color} />
127
- <ThemedText className="ml-4 flex-1" style={{ fontSize: 17, color }}>
114
+ <ThemedText
115
+ className={`ml-4 flex-1 text-[17px] ${destructive ? "text-[#dc2626] dark:text-[#f87171]" : "text-[#18181b] dark:text-[#fafafa]"}`}
116
+ >
128
117
  {label}
129
118
  </ThemedText>
130
119
  {value ? (
131
120
  <ThemedText
132
- className="ml-3 max-w-[48%] text-right"
121
+ className="ml-3 max-w-[48%] text-right text-[16px] text-[#71717a] dark:text-[#a1a1aa]"
133
122
  numberOfLines={1}
134
- style={{ fontSize: 16, color: colors.secondary }}
135
123
  >
136
124
  {value}
137
125
  </ThemedText>
@@ -142,29 +130,30 @@ export function PreferenceRow({
142
130
  name={{ ios: "chevron.right", android: "chevron_right" }}
143
131
  size={13}
144
132
  tintColor={colors.secondary}
145
- style={{ marginLeft: 8 }}
133
+ className="ml-[8px]"
146
134
  />
147
135
  ) : null)}
148
136
  </>
149
137
  );
150
138
  return onPress ? (
151
- <Pressable
152
- accessibilityRole="button"
153
- accessibilityLabel={label}
154
- disabled={disabled}
155
- onPress={onPress}
156
- style={{ width }}
157
- className="min-h-[60px] flex-row items-center px-5 py-3 active:opacity-60 disabled:opacity-50"
158
- >
159
- {content}
160
- </Pressable>
139
+ <VariableContextProvider value={{ "--layout-width": width ?? "auto" }}>
140
+ <Pressable
141
+ accessibilityRole="button"
142
+ accessibilityLabel={label}
143
+ disabled={disabled}
144
+ onPress={onPress}
145
+
146
+ className="min-h-[60px] flex-row items-center px-5 py-3 active:opacity-60 disabled:opacity-50 w-[var(--layout-width)]"
147
+ >
148
+ {content}
149
+ </Pressable>
150
+ </VariableContextProvider>
161
151
  ) : (
162
- <View
163
- style={{ width }}
164
- className="min-h-[60px] flex-row items-center px-5 py-3"
165
- >
166
- {content}
167
- </View>
152
+ <VariableContextProvider value={{ "--layout-width": width ?? "auto" }}>
153
+ <View className="min-h-[60px] flex-row items-center px-5 py-3 w-[var(--layout-width)]">
154
+ {content}
155
+ </View>
156
+ </VariableContextProvider>
168
157
  );
169
158
  }
170
159
 
@@ -207,25 +196,12 @@ export function GlassIconButton({
207
196
  isInteractive
208
197
  colorScheme={colors.dark ? "dark" : "light"}
209
198
  glassEffectStyle="regular"
210
- style={{
211
- width: 48,
212
- height: 48,
213
- borderRadius: 24,
214
- alignItems: "center",
215
- justifyContent: "center",
216
- }}
199
+ className="size-[48px] items-center justify-center rounded-[24px]"
217
200
  >
218
201
  {symbol}
219
202
  </GlassView>
220
203
  ) : (
221
- <View
222
- className="h-12 w-12 items-center justify-center rounded-full"
223
- style={{
224
- backgroundColor: colors.card,
225
- borderWidth: 1,
226
- borderColor: colors.separator,
227
- }}
228
- >
204
+ <View className="h-12 w-12 items-center justify-center rounded-full bg-[#ffffff] dark:bg-[#18181b] border-[1px] border-[#e4e4e7] dark:border-[#27272a]">
229
205
  {symbol}
230
206
  </View>
231
207
  )}
@@ -1,4 +1,5 @@
1
- import { Host, Text as NativeText } from "@expo/ui";
1
+ import { Host, GlassView } from "./nativewind";
2
+ import { Text as NativeText } from "@expo/ui";
2
3
  import { fillMaxWidth } from "@expo/ui/jetpack-compose/modifiers";
3
4
  import {
4
5
  frame,
@@ -7,26 +8,18 @@ import {
7
8
  } from "@expo/ui/swift-ui/modifiers";
8
9
  import { NativeButton } from "./native-button";
9
10
  import { useTheme } from "./use-theme";
10
- import { useColorScheme } from "react-native";
11
- import {
12
- GlassView,
13
- isLiquidGlassAvailable,
14
- isGlassEffectAPIAvailable,
15
- } from "expo-glass-effect";
16
11
  import {
12
+ useColorScheme,
17
13
  AccessibilityInfo,
18
14
  useWindowDimensions,
19
- type StyleProp,
20
- type ViewStyle,
21
15
  Pressable,
22
16
  View,
23
17
  } from "react-native";
24
18
  import {
25
- useEffect,
26
- useState,
27
- type ComponentProps,
28
- type ReactNode,
29
- } from "react";
19
+ isLiquidGlassAvailable,
20
+ isGlassEffectAPIAvailable,
21
+ } from "expo-glass-effect";
22
+ import { useEffect, useState, type ReactNode } from "react";
30
23
 
31
24
  export const space = {
32
25
  tiny: 4,
@@ -69,7 +62,7 @@ export function NativeLabel({
69
62
  pointerEvents="none"
70
63
  matchContents={inline ? true : { vertical: true }}
71
64
  colorScheme={scheme ?? "dark"}
72
- style={inline ? undefined : { width: "100%" }}
65
+ className={inline ? undefined : "w-full"}
73
66
  >
74
67
  <NativeText
75
68
  modifiers={
@@ -114,20 +107,14 @@ export function NativeAction({
114
107
  const colors = useTheme();
115
108
  const scheme = useColorScheme();
116
109
  return (
117
- <View
118
- style={
119
- compact
120
- ? { alignSelf: "flex-start", maxWidth: "100%" }
121
- : { width: "100%" }
122
- }
123
- >
110
+ <View className={compact ? "self-start max-w-[100%]" : "w-[100%]"}>
124
111
  <Host
125
112
  matchContents={compact ? true : { vertical: true }}
126
113
  colorScheme={scheme ?? "dark"}
127
114
  seedColor={
128
115
  process.env.EXPO_OS === "android" ? colors.primary : colors.foreground
129
116
  }
130
- style={compact ? { minHeight: 48 } : { width: "100%", minHeight: 48 }}
117
+ className={compact ? "min-h-[48px]" : "min-h-[48px] w-full"}
131
118
  >
132
119
  <NativeButton
133
120
  label={label}
@@ -155,14 +142,13 @@ export function NativeAction({
155
142
  }
156
143
  export function GlassSurface({
157
144
  children,
158
- style,
145
+ className,
159
146
  interactive = false,
160
147
  }: {
161
148
  children: ReactNode;
162
- style?: ComponentProps<typeof View>["style"];
149
+ className?: string;
163
150
  interactive?: boolean;
164
151
  }) {
165
- const colors = useTheme();
166
152
  const [solid, setSolid] = useState(true);
167
153
  useEffect(() => {
168
154
  let mounted = true;
@@ -184,17 +170,12 @@ export function GlassSurface({
184
170
  <GlassView
185
171
  glassEffectStyle="regular"
186
172
  isInteractive={interactive}
187
- style={[{ borderRadius: shape.card }, style]}
173
+ className={className ?? "rounded-[28px]"}
188
174
  >
189
175
  {children}
190
176
  </GlassView>
191
177
  ) : (
192
- <View
193
- style={[
194
- { backgroundColor: colors.card, borderRadius: shape.card },
195
- style,
196
- ]}
197
- >
178
+ <View className={`bg-card ${className ?? "rounded-[28px]"}`}>
198
179
  {children}
199
180
  </View>
200
181
  );
@@ -204,13 +185,13 @@ export function Touch({
204
185
  onPress,
205
186
  label,
206
187
  selected,
207
- style,
188
+ className,
208
189
  }: {
209
190
  children: ReactNode;
210
191
  onPress: () => void;
211
192
  label: string;
212
193
  selected?: boolean;
213
- style?: StyleProp<ViewStyle>;
194
+ className?: string;
214
195
  }) {
215
196
  return (
216
197
  <Pressable
@@ -218,10 +199,7 @@ export function Touch({
218
199
  accessibilityLabel={label}
219
200
  accessibilityState={{ selected }}
220
201
  onPress={onPress}
221
- style={({ pressed }) => [
222
- { minHeight: 48, opacity: pressed ? 0.65 : 1 },
223
- style,
224
- ]}
202
+ className={`min-h-[48px] active:opacity-[0.65] ${className ?? ""}`}
225
203
  >
226
204
  {children}
227
205
  </Pressable>
@@ -2,7 +2,7 @@ import { Text, type TextProps } from "react-native";
2
2
 
3
3
  import { ThemeColor } from "./theme";
4
4
 
5
- export type ThemedTextProps = TextProps & {
5
+ export type ThemedTextProps = Omit<TextProps, "style"> & {
6
6
  type?:
7
7
  | "default"
8
8
  | "title"
@@ -43,18 +43,16 @@ const typeClasses: Record<NonNullable<ThemedTextProps["type"]>, string> = {
43
43
 
44
44
  export function ThemedText({
45
45
  className,
46
- style,
47
46
  type = "default",
48
47
  themeColor,
49
48
  ...rest
50
49
  }: ThemedTextProps) {
51
50
  const color =
52
- themeColor ?? (type === "linkPrimary" ? "primaryText" : "foreground");
51
+ themeColor ?? (type === "linkPrimary" ? "primaryText" : undefined);
53
52
 
54
53
  return (
55
54
  <Text
56
- className={`${colorClasses[color]} ${typeClasses[type]} ${className ?? ""}`}
57
- style={style}
55
+ className={`themed-text ${color ? colorClasses[color] : ""} ${typeClasses[type]} ${className ?? ""}`}
58
56
  {...rest}
59
57
  />
60
58
  );
@@ -1,5 +1,6 @@
1
1
  @import "tailwindcss/theme.css" layer(theme);
2
2
  @import "tailwindcss/preflight.css" layer(base);
3
+ @import "./typography.css" layer(components);
3
4
  @import "tailwindcss/utilities.css";
4
5
 
5
6
  @import "nativewind/theme";
@@ -107,59 +108,3 @@
107
108
  --accent: #ffffff;
108
109
  }
109
110
  }
110
-
111
- .type-default,
112
- .type-title,
113
- .type-subtitle,
114
- .type-small,
115
- .type-small-bold,
116
- .type-link {
117
- font-family: "Spline Sans";
118
- }
119
-
120
- .type-default {
121
- font-size: 16px;
122
- font-weight: 500;
123
- line-height: 24px;
124
- }
125
-
126
- .type-title {
127
- font-size: 48px;
128
- font-weight: 600;
129
- line-height: 52px;
130
- }
131
-
132
- .type-subtitle {
133
- font-size: 32px;
134
- font-weight: 600;
135
- line-height: 44px;
136
- }
137
-
138
- .type-small {
139
- font-size: 14px;
140
- font-weight: 500;
141
- line-height: 20px;
142
- }
143
-
144
- .type-small-bold {
145
- font-size: 14px;
146
- font-weight: 700;
147
- line-height: 20px;
148
- }
149
-
150
- .type-link {
151
- font-size: 14px;
152
- line-height: 30px;
153
- }
154
-
155
- .type-code {
156
- font-family: ui-monospace;
157
- font-size: 12px;
158
- font-weight: 500;
159
- }
160
-
161
- @media android {
162
- .type-code {
163
- font-weight: 700;
164
- }
165
- }
@@ -4,7 +4,7 @@ import { Redirect, Stack, router, usePathname } from "expo-router";
4
4
  import { useEffect, useRef, useState, type ReactNode } from "react";
5
5
  import { ActivityIndicator, Pressable, Text, View } from "react-native";
6
6
  import { analyticsEnabled, authenticationEnabled } from "../features";
7
- import { useAuthStyles } from "./components/auth-ui";
7
+ import { authClasses } from "./components/auth-ui";
8
8
  import { authStorage } from "./lib/auth-storage";
9
9
  import { api } from "./lib/convex";
10
10
  import { sendPageTelemetry } from "../lib/telemetry";
@@ -22,7 +22,6 @@ export function MobileLayout({ children }: { children?: ReactNode }) {
22
22
  }
23
23
 
24
24
  function BackendLayout({ children }: { children?: ReactNode }) {
25
- const styles = useAuthStyles();
26
25
  const [client] = useState(() => {
27
26
  const url = process.env.EXPO_PUBLIC_CONVEX_URL;
28
27
  return url ? new ConvexReactClient(url) : null;
@@ -30,9 +29,9 @@ function BackendLayout({ children }: { children?: ReactNode }) {
30
29
 
31
30
  if (!client) {
32
31
  return (
33
- <View style={[styles.screen, styles.content]}>
34
- <Text style={styles.title}>Connect your backend</Text>
35
- <Text style={styles.body}>
32
+ <View className={`${authClasses.screen} ${authClasses.content}`}>
33
+ <Text className={authClasses.title}>Connect your backend</Text>
34
+ <Text className={authClasses.body}>
36
35
  Set EXPO_PUBLIC_CONVEX_URL in apps/mobile/.env.local, then rebuild the
37
36
  app.
38
37
  </Text>
@@ -122,15 +121,14 @@ export function AuthLayout() {
122
121
  }
123
122
 
124
123
  function CloseAuth() {
125
- const colors = useTheme();
126
124
  return (
127
125
  <Pressable
128
126
  accessibilityRole="button"
129
127
  accessibilityLabel="Close sign in"
130
128
  onPress={() => router.dismissTo("/")}
131
- style={{ padding: 10 }}
129
+ className="p-[10px]"
132
130
  >
133
- <Text style={{ color: colors.foreground, fontSize: 18 }}>✕</Text>
131
+ <Text className="text-foreground text-[18px]">✕</Text>
134
132
  </Pressable>
135
133
  );
136
134
  }
@@ -142,11 +140,10 @@ export function AuthenticatedLayout() {
142
140
  }
143
141
 
144
142
  function SessionLayout() {
145
- const styles = useAuthStyles();
146
143
  const { isLoading, isAuthenticated } = useConvexAuth();
147
144
  if (isLoading) {
148
145
  return (
149
- <View style={[styles.screen, styles.content]}>
146
+ <View className={`${authClasses.screen} ${authClasses.content}`}>
150
147
  <ActivityIndicator accessibilityLabel="Loading session" />
151
148
  </View>
152
149
  );
@@ -13,7 +13,6 @@ import {
13
13
  PreferenceCard,
14
14
  PreferenceRow,
15
15
  PreferenceSection,
16
- usePreferenceColors,
17
16
  } from "../design/preferences";
18
17
  import { ThemedText } from "../design/themed-text";
19
18
  import { api } from "../lib/convex";
@@ -92,7 +91,6 @@ function SignedInSettings({
92
91
  footer,
93
92
  onCopyEmail = copyEmail,
94
93
  }: AccountScreenProps) {
95
- const colors = usePreferenceColors();
96
94
  const { isAuthenticated } = useConvexAuth();
97
95
  const user = useQuery(api.users.index.current, isAuthenticated ? {} : "skip");
98
96
  const account = useQuery(api.auth.account, isAuthenticated ? {} : "skip");
@@ -157,7 +155,7 @@ function SignedInSettings({
157
155
  {/* payments:start */}
158
156
  {isAuthenticated && user && features.paymentsEnabled && !pending && (
159
157
  <PreferenceSection title="Billing">
160
- <View style={{ padding: 20 }}>
158
+ <View className="p-[20px]">
161
159
  <AccountBilling
162
160
  key={`${user.id}:${billingEpoch}`}
163
161
  customerId={user.id}
@@ -183,8 +181,7 @@ function SignedInSettings({
183
181
  {error && (
184
182
  <ThemedText
185
183
  accessibilityRole="alert"
186
- className="mt-3"
187
- style={{ color: colors.destructive }}
184
+ className="mt-3 text-[#dc2626] dark:text-[#f87171]"
188
185
  >
189
186
  {error}
190
187
  </ThemedText>
@@ -197,12 +194,8 @@ function SignedInSettings({
197
194
  }
198
195
 
199
196
  function Version() {
200
- const colors = usePreferenceColors();
201
197
  return Constants.expoConfig?.version ? (
202
- <ThemedText
203
- className="mt-7 text-center"
204
- style={{ color: colors.secondary, fontSize: 13 }}
205
- >
198
+ <ThemedText className="mt-7 text-center text-[#71717a] dark:text-[#a1a1aa] text-[13px]">
206
199
  Version {Constants.expoConfig.version}
207
200
  </ThemedText>
208
201
  ) : null;