create-better-t-stack 2.44.0 → 2.45.0
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/dist/cli.js +1 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +1 -1
- package/dist/{src-CwLBNdNq.js → src-Cve0nldx.js} +21 -9
- package/package.json +1 -1
- package/templates/auth/better-auth/native/native-base/lib/auth-client.ts.hbs +3 -2
- package/templates/auth/better-auth/server/base/src/lib/auth.ts.hbs +5 -5
- package/templates/backend/server/next/package.json.hbs +3 -3
- package/templates/frontend/native/native-base/assets/images/android-icon-background.png +0 -0
- package/templates/frontend/native/native-base/assets/images/android-icon-foreground.png +0 -0
- package/templates/frontend/native/native-base/assets/images/android-icon-monochrome.png +0 -0
- package/templates/frontend/native/native-base/assets/images/favicon.png +0 -0
- package/templates/frontend/native/native-base/assets/images/icon.png +0 -0
- package/templates/frontend/native/native-base/assets/images/partial-react-logo.png +0 -0
- package/templates/frontend/native/native-base/assets/images/react-logo.png +0 -0
- package/templates/frontend/native/native-base/assets/images/react-logo@2x.png +0 -0
- package/templates/frontend/native/native-base/assets/images/react-logo@3x.png +0 -0
- package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/{_layout.tsx → _layout.tsx.hbs} +3 -3
- package/templates/frontend/native/nativewind/app/{+not-found.tsx → +not-found.tsx.hbs} +1 -1
- package/templates/frontend/native/nativewind/app.json.hbs +49 -0
- package/templates/frontend/native/nativewind/babel.config.js.hbs +14 -0
- package/templates/frontend/native/nativewind/components/{container.tsx → container.tsx.hbs} +1 -1
- package/templates/frontend/native/nativewind/components/{header-button.tsx → header-button.tsx.hbs} +1 -1
- package/templates/frontend/native/{unistyles/components/tabbar-icon.tsx → nativewind/components/tabbar-icon.tsx.hbs} +1 -1
- package/templates/frontend/native/nativewind/metro.config.js.hbs +31 -0
- package/templates/frontend/native/nativewind/package.json.hbs +23 -21
- package/templates/frontend/native/nativewind/tailwind.config.js.hbs +59 -0
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/{_layout.tsx → _layout.tsx.hbs} +3 -3
- package/templates/frontend/native/unistyles/app/(drawer)/index.tsx.hbs +1 -3
- package/templates/frontend/native/unistyles/app/{+not-found.tsx → +not-found.tsx.hbs} +2 -2
- package/templates/frontend/native/unistyles/app/_layout.tsx.hbs +2 -2
- package/templates/frontend/native/unistyles/app.json.hbs +49 -0
- package/templates/frontend/native/unistyles/babel.config.js.hbs +21 -0
- package/templates/frontend/native/unistyles/components/{container.tsx → container.tsx.hbs} +1 -1
- package/templates/frontend/native/unistyles/components/{header-button.tsx → header-button.tsx.hbs} +1 -1
- package/templates/frontend/native/{nativewind/components/tabbar-icon.tsx → unistyles/components/tabbar-icon.tsx.hbs} +1 -1
- package/templates/frontend/native/unistyles/metro.config.js.hbs +5 -0
- package/templates/frontend/native/unistyles/package.json.hbs +29 -28
- package/templates/frontend/native/unistyles/theme.ts.hbs +98 -0
- package/templates/frontend/react/next/package.json.hbs +3 -3
- package/templates/frontend/react/react-router/package.json.hbs +3 -3
- package/templates/frontend/react/tanstack-router/package.json.hbs +3 -3
- package/templates/frontend/react/tanstack-start/package.json.hbs +3 -3
- package/templates/frontend/native/native-base/assets/favicon.png +0 -0
- package/templates/frontend/native/native-base/assets/icon.png +0 -0
- package/templates/frontend/native/native-base/assets/splash.png +0 -0
- package/templates/frontend/native/nativewind/app/+html.tsx +0 -47
- package/templates/frontend/native/nativewind/app-env.d.ts +0 -2
- package/templates/frontend/native/nativewind/app.json +0 -46
- package/templates/frontend/native/nativewind/babel.config.js +0 -11
- package/templates/frontend/native/nativewind/metro.config.js +0 -59
- package/templates/frontend/native/nativewind/tailwind.config.js +0 -59
- package/templates/frontend/native/unistyles/app/+html.tsx +0 -48
- package/templates/frontend/native/unistyles/app.json +0 -44
- package/templates/frontend/native/unistyles/babel.config.js +0 -21
- package/templates/frontend/native/unistyles/expo-env.d.ts +0 -3
- package/templates/frontend/native/unistyles/metro.config.js +0 -20
- package/templates/frontend/native/unistyles/theme.ts +0 -98
- /package/templates/frontend/native/native-base/assets/{adaptive-icon.png → images/splash-icon.png} +0 -0
- /package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/{index.tsx → index.tsx.hbs} +0 -0
- /package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/{two.tsx → two.tsx.hbs} +0 -0
- /package/templates/frontend/native/nativewind/app/{modal.tsx → modal.tsx.hbs} +0 -0
- /package/templates/frontend/native/nativewind/lib/{android-navigation-bar.tsx → android-navigation-bar.tsx.hbs} +0 -0
- /package/templates/frontend/native/nativewind/lib/{constants.ts → constants.ts.hbs} +0 -0
- /package/templates/frontend/native/nativewind/lib/{use-color-scheme.ts → use-color-scheme.ts.hbs} +0 -0
- /package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/{index.tsx → index.tsx.hbs} +0 -0
- /package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/{two.tsx → two.tsx.hbs} +0 -0
- /package/templates/frontend/native/unistyles/app/{modal.tsx → modal.tsx.hbs} +0 -0
- /package/templates/frontend/native/unistyles/{breakpoints.ts → breakpoints.ts.hbs} +0 -0
- /package/templates/frontend/native/unistyles/{index.js → index.js.hbs} +0 -0
- /package/templates/frontend/native/unistyles/{unistyles.ts → unistyles.ts.hbs} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module.exports = (api) => {
|
|
2
|
+
api.cache(true);
|
|
3
|
+
const plugins = [];
|
|
4
|
+
|
|
5
|
+
plugins.push([
|
|
6
|
+
"react-native-unistyles/plugin",
|
|
7
|
+
{
|
|
8
|
+
root: "src",
|
|
9
|
+
autoProcessRoot: "app",
|
|
10
|
+
autoProcessImports: ["@/components"],
|
|
11
|
+
},
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
plugins.push("react-native-worklets/plugin");
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
presets: ["babel-preset-expo"],
|
|
18
|
+
|
|
19
|
+
plugins,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { SafeAreaView } from "react-native";
|
|
2
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
3
3
|
import { StyleSheet } from "react-native-unistyles";
|
|
4
4
|
|
|
5
5
|
export const Container = ({ children }: { children: React.ReactNode }) => {
|
|
@@ -4,5 +4,5 @@ export const TabBarIcon = (props: {
|
|
|
4
4
|
name: React.ComponentProps<typeof FontAwesome>["name"];
|
|
5
5
|
color: string;
|
|
6
6
|
}) => {
|
|
7
|
-
return <FontAwesome size={24} style
|
|
7
|
+
return <FontAwesome size={24} style=\{{ marginBottom: -3 }} {...props} />;
|
|
8
8
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
4
5
|
"main": "index.js",
|
|
5
6
|
"scripts": {
|
|
6
7
|
"dev": "expo start --clear",
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
"web": "expo start --web"
|
|
10
11
|
},
|
|
11
12
|
"dependencies": {
|
|
12
|
-
"@expo/vector-icons": "^
|
|
13
|
+
"@expo/vector-icons": "^15.0.2",
|
|
13
14
|
"@react-navigation/bottom-tabs": "^7.3.10",
|
|
14
15
|
"@react-navigation/drawer": "^7.3.9",
|
|
15
16
|
"@react-navigation/native": "^7.1.6",
|
|
@@ -17,35 +18,35 @@
|
|
|
17
18
|
"@stardazed/streams-text-encoding": "^1.0.2",
|
|
18
19
|
"@ungap/structured-clone": "^1.3.0",
|
|
19
20
|
{{/if}}
|
|
20
|
-
"@tanstack/react-form": "^1.
|
|
21
|
-
"
|
|
22
|
-
"expo": "
|
|
23
|
-
"expo-
|
|
24
|
-
"expo-
|
|
25
|
-
"expo-
|
|
26
|
-
"expo-
|
|
27
|
-
"expo-
|
|
28
|
-
|
|
29
|
-
"expo-system-ui": "~
|
|
30
|
-
|
|
31
|
-
"expo-web-browser": "~
|
|
32
|
-
"react": "19.
|
|
33
|
-
"react-dom": "19.
|
|
34
|
-
"react-native": "0.
|
|
35
|
-
|
|
36
|
-
"react-native-gesture-handler": "~2.
|
|
37
|
-
|
|
38
|
-
"react-native-reanimated": "~
|
|
39
|
-
"react-native-safe-area-context": "5.
|
|
40
|
-
"react-native-screens": "~4.
|
|
41
|
-
|
|
42
|
-
"react-native-web": "^0.
|
|
21
|
+
"@tanstack/react-form": "^1.0.5",
|
|
22
|
+
"expo": "^54.0.0",
|
|
23
|
+
"expo-constants": "~18.0.8",
|
|
24
|
+
"expo-crypto": "~15.0.6",
|
|
25
|
+
"expo-linking": "~8.0.7",
|
|
26
|
+
"expo-router": "~6.0.0",
|
|
27
|
+
"expo-secure-store": "~15.0.6",
|
|
28
|
+
"expo-splash-screen": "~31.0.8",
|
|
29
|
+
"expo-status-bar": "^3.0.7",
|
|
30
|
+
"expo-system-ui": "~6.0.7",
|
|
31
|
+
"expo-dev-client": "~6.0.11",
|
|
32
|
+
"expo-web-browser": "~15.0.6",
|
|
33
|
+
"react": "19.1.0",
|
|
34
|
+
"react-dom": "19.1.0",
|
|
35
|
+
"react-native": "0.81.4",
|
|
36
|
+
"react-native-edge-to-edge": "^1.7.0",
|
|
37
|
+
"react-native-gesture-handler": "~2.28.0",
|
|
38
|
+
"react-native-nitro-modules": "^0.29.4",
|
|
39
|
+
"react-native-reanimated": "~4.1.0",
|
|
40
|
+
"react-native-safe-area-context": "~5.6.0",
|
|
41
|
+
"react-native-screens": "~4.16.0",
|
|
42
|
+
"react-native-unistyles": "^3.0.12",
|
|
43
|
+
"react-native-web": "^0.21.0",
|
|
44
|
+
"react-native-worklets": "^0.5.1"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"ajv": "^8.17.1",
|
|
46
48
|
"@babel/core": "^7.28.0",
|
|
47
|
-
"@types/react": "~19.
|
|
48
|
-
"typescript": "~5.
|
|
49
|
-
}
|
|
50
|
-
"private": true
|
|
49
|
+
"@types/react": "~19.1.10",
|
|
50
|
+
"typescript": "~5.9.2"
|
|
51
|
+
}
|
|
51
52
|
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
const sharedColors = {
|
|
2
|
+
success: "#22C55E",
|
|
3
|
+
destructive: "#EF4444",
|
|
4
|
+
warning: "#F59E0B",
|
|
5
|
+
info: "#3B82F6",
|
|
6
|
+
} as const;
|
|
7
|
+
|
|
8
|
+
export const lightTheme = {
|
|
9
|
+
colors: {
|
|
10
|
+
...sharedColors,
|
|
11
|
+
typography: "hsl(0 0% 0%)",
|
|
12
|
+
background: "hsl(0 0% 100%)",
|
|
13
|
+
foreground: "hsl(0 0% 0%)",
|
|
14
|
+
card: "hsl(0 0% 98%)",
|
|
15
|
+
cardForeground: "hsl(0 0% 0%)",
|
|
16
|
+
primary: "hsl(0 0% 10%)",
|
|
17
|
+
primaryForeground: "hsl(0 0% 100%)",
|
|
18
|
+
secondary: "hsl(0 0% 95%)",
|
|
19
|
+
secondaryForeground: "hsl(0 0% 0%)",
|
|
20
|
+
muted: "hsl(0 0% 96%)",
|
|
21
|
+
mutedForeground: "hsl(0 0% 45%)",
|
|
22
|
+
accent: "hsl(0 0% 96%)",
|
|
23
|
+
accentForeground: "hsl(0 0% 0%)",
|
|
24
|
+
border: "hsl(0 0% 90%)",
|
|
25
|
+
input: "hsl(0 0% 90%)",
|
|
26
|
+
ring: "hsl(0 0% 20%)",
|
|
27
|
+
},
|
|
28
|
+
spacing: {
|
|
29
|
+
xs: 4,
|
|
30
|
+
sm: 8,
|
|
31
|
+
md: 16,
|
|
32
|
+
lg: 24,
|
|
33
|
+
xl: 32,
|
|
34
|
+
xxl: 48,
|
|
35
|
+
},
|
|
36
|
+
borderRadius: {
|
|
37
|
+
sm: 6,
|
|
38
|
+
md: 8,
|
|
39
|
+
lg: 12,
|
|
40
|
+
xl: 16,
|
|
41
|
+
},
|
|
42
|
+
fontSize: {
|
|
43
|
+
xs: 12,
|
|
44
|
+
sm: 14,
|
|
45
|
+
base: 16,
|
|
46
|
+
lg: 18,
|
|
47
|
+
xl: 20,
|
|
48
|
+
"2xl": 24,
|
|
49
|
+
"3xl": 30,
|
|
50
|
+
"4xl": 36,
|
|
51
|
+
},
|
|
52
|
+
} as const;
|
|
53
|
+
|
|
54
|
+
export const darkTheme = {
|
|
55
|
+
colors: {
|
|
56
|
+
...sharedColors,
|
|
57
|
+
typography: "hsl(0 0% 100%)",
|
|
58
|
+
background: "hsl(0 0% 0%)",
|
|
59
|
+
foreground: "hsl(0 0% 100%)",
|
|
60
|
+
card: "hsl(0 0% 2%)",
|
|
61
|
+
cardForeground: "hsl(0 0% 100%)",
|
|
62
|
+
primary: "hsl(0 0% 90%)",
|
|
63
|
+
primaryForeground: "hsl(0 0% 0%)",
|
|
64
|
+
secondary: "hsl(0 0% 10%)",
|
|
65
|
+
secondaryForeground: "hsl(0 0% 100%)",
|
|
66
|
+
muted: "hsl(0 0% 8%)",
|
|
67
|
+
mutedForeground: "hsl(0 0% 65%)",
|
|
68
|
+
accent: "hsl(0 0% 8%)",
|
|
69
|
+
accentForeground: "hsl(0 0% 100%)",
|
|
70
|
+
border: "hsl(0 0% 15%)",
|
|
71
|
+
input: "hsl(0 0% 15%)",
|
|
72
|
+
ring: "hsl(0 0% 80%)",
|
|
73
|
+
},
|
|
74
|
+
spacing: {
|
|
75
|
+
xs: 4,
|
|
76
|
+
sm: 8,
|
|
77
|
+
md: 16,
|
|
78
|
+
lg: 24,
|
|
79
|
+
xl: 32,
|
|
80
|
+
xxl: 48,
|
|
81
|
+
},
|
|
82
|
+
borderRadius: {
|
|
83
|
+
sm: 6,
|
|
84
|
+
md: 8,
|
|
85
|
+
lg: 12,
|
|
86
|
+
xl: 16,
|
|
87
|
+
},
|
|
88
|
+
fontSize: {
|
|
89
|
+
xs: 12,
|
|
90
|
+
sm: 14,
|
|
91
|
+
base: 16,
|
|
92
|
+
lg: 18,
|
|
93
|
+
xl: 20,
|
|
94
|
+
"2xl": 24,
|
|
95
|
+
"3xl": 30,
|
|
96
|
+
"4xl": 36,
|
|
97
|
+
},
|
|
98
|
+
} as const;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"lucide-react": "^0.487.0",
|
|
16
16
|
"next": "15.5.0",
|
|
17
17
|
"next-themes": "^0.4.6",
|
|
18
|
-
"react": "
|
|
19
|
-
"react-dom": "
|
|
18
|
+
"react": "19.1.0",
|
|
19
|
+
"react-dom": "19.1.0",
|
|
20
20
|
"sonner": "^2.0.5",
|
|
21
21
|
"tailwind-merge": "^3.3.1",
|
|
22
22
|
"tw-animate-css": "^1.3.4",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@tailwindcss/postcss": "^4.1.10",
|
|
27
27
|
"@types/node": "^20",
|
|
28
|
-
"@types/react": "
|
|
28
|
+
"@types/react": "~19.1.10",
|
|
29
29
|
"@types/react-dom": "^19",
|
|
30
30
|
"tailwindcss": "^4.1.10",
|
|
31
31
|
"typescript": "^5"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"isbot": "^5.1.28",
|
|
20
20
|
"lucide-react": "^0.511.0",
|
|
21
21
|
"next-themes": "^0.4.6",
|
|
22
|
-
"react": "19.
|
|
23
|
-
"react-dom": "19.
|
|
22
|
+
"react": "19.1.0",
|
|
23
|
+
"react-dom": "19.1.0",
|
|
24
24
|
"react-router": "^7.6.1",
|
|
25
25
|
"sonner": "^2.0.3",
|
|
26
26
|
"tailwind-merge": "^3.3.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@react-router/dev": "^7.6.1",
|
|
32
32
|
"@tailwindcss/vite": "^4.1.8",
|
|
33
33
|
"@types/node": "^20",
|
|
34
|
-
"@types/react": "
|
|
34
|
+
"@types/react": "~19.1.10",
|
|
35
35
|
"@types/react-dom": "^19.0.4",
|
|
36
36
|
"react-router-devtools": "^1.1.0",
|
|
37
37
|
"tailwindcss": "^4.1.8",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"clsx": "^2.1.1",
|
|
21
21
|
"lucide-react": "^0.473.0",
|
|
22
22
|
"next-themes": "^0.4.6",
|
|
23
|
-
"react": "
|
|
24
|
-
"react-dom": "
|
|
23
|
+
"react": "19.1.0",
|
|
24
|
+
"react-dom": "19.1.0",
|
|
25
25
|
"sonner": "^2.0.5",
|
|
26
26
|
"tailwind-merge": "^3.3.1",
|
|
27
27
|
"tw-animate-css": "^1.2.5",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@tanstack/react-router-devtools": "^1.114.27",
|
|
32
32
|
"@tanstack/router-plugin": "^1.114.27",
|
|
33
33
|
"@types/node": "^22.13.13",
|
|
34
|
-
"@types/react": "
|
|
34
|
+
"@types/react": "~19.1.10",
|
|
35
35
|
"@types/react-dom": "^19.0.4",
|
|
36
36
|
"@vitejs/plugin-react": "^4.3.4",
|
|
37
37
|
"postcss": "^8.5.3",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"clsx": "^2.1.1",
|
|
21
21
|
"lucide-react": "^0.525.0",
|
|
22
22
|
"next-themes": "^0.4.6",
|
|
23
|
-
"react": "19.
|
|
24
|
-
"react-dom": "19.
|
|
23
|
+
"react": "19.1.0",
|
|
24
|
+
"react-dom": "19.1.0",
|
|
25
25
|
"sonner": "^2.0.3",
|
|
26
26
|
"tailwindcss": "^4.1.3",
|
|
27
27
|
"tailwind-merge": "^3.3.1",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@tanstack/react-router-devtools": "^1.121.0-alpha.27",
|
|
34
34
|
"@testing-library/dom": "^10.4.0",
|
|
35
35
|
"@testing-library/react": "^16.2.0",
|
|
36
|
-
"@types/react": "
|
|
36
|
+
"@types/react": "~19.1.10",
|
|
37
37
|
"@types/react-dom": "^19.0.4",
|
|
38
38
|
"@vitejs/plugin-react": "^5.0.1",
|
|
39
39
|
"jsdom": "^26.0.0",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ScrollViewStyleReset } from 'expo-router/html';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
// This file is web-only and used to configure the root HTML for every
|
|
5
|
-
// web page during static rendering.
|
|
6
|
-
// The contents of this function only run in Node.js environments and
|
|
7
|
-
// do not have access to the DOM or browser APIs.
|
|
8
|
-
export default function Root({ children }: { children: ReactNode }) {
|
|
9
|
-
return (
|
|
10
|
-
<html lang="en">
|
|
11
|
-
<head>
|
|
12
|
-
<meta charSet="utf-8" />
|
|
13
|
-
<meta content="IE=edge" httpEquiv="X-UA-Compatible" />
|
|
14
|
-
|
|
15
|
-
{/*
|
|
16
|
-
This viewport disables scaling which makes the mobile website act more like a native app.
|
|
17
|
-
However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
|
|
18
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
19
|
-
*/}
|
|
20
|
-
<meta
|
|
21
|
-
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
|
|
22
|
-
name="viewport"
|
|
23
|
-
/>
|
|
24
|
-
{/*
|
|
25
|
-
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
|
26
|
-
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
|
|
27
|
-
*/}
|
|
28
|
-
<ScrollViewStyleReset />
|
|
29
|
-
|
|
30
|
-
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
|
|
31
|
-
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
|
|
32
|
-
{/* Add any additional <head> elements that you want globally available on web... */}
|
|
33
|
-
</head>
|
|
34
|
-
<body>{children}</body>
|
|
35
|
-
</html>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const responsiveBackground = `
|
|
40
|
-
body {
|
|
41
|
-
background-color: #fff;
|
|
42
|
-
}
|
|
43
|
-
@media (prefers-color-scheme: dark) {
|
|
44
|
-
body {
|
|
45
|
-
background-color: #000;
|
|
46
|
-
}
|
|
47
|
-
}`;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"expo": {
|
|
3
|
-
"name": "my-better-t-app",
|
|
4
|
-
"slug": "my-better-t-app",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"scheme": "my-better-t-app",
|
|
7
|
-
"web": {
|
|
8
|
-
"bundler": "metro",
|
|
9
|
-
"output": "static",
|
|
10
|
-
"favicon": "./assets/favicon.png"
|
|
11
|
-
},
|
|
12
|
-
"plugins": [
|
|
13
|
-
"expo-router",
|
|
14
|
-
"expo-secure-store",
|
|
15
|
-
"expo-web-browser"
|
|
16
|
-
],
|
|
17
|
-
"experiments": {
|
|
18
|
-
"typedRoutes": true,
|
|
19
|
-
"tsconfigPaths": true
|
|
20
|
-
},
|
|
21
|
-
"newArchEnabled": true,
|
|
22
|
-
"orientation": "portrait",
|
|
23
|
-
"icon": "./assets/icon.png",
|
|
24
|
-
"userInterfaceStyle": "light",
|
|
25
|
-
"splash": {
|
|
26
|
-
"image": "./assets/splash.png",
|
|
27
|
-
"resizeMode": "contain",
|
|
28
|
-
"backgroundColor": "#ffffff"
|
|
29
|
-
},
|
|
30
|
-
"assetBundlePatterns": [
|
|
31
|
-
"**/*"
|
|
32
|
-
],
|
|
33
|
-
"ios": {
|
|
34
|
-
"supportsTablet": true,
|
|
35
|
-
"bundleIdentifier": "com.amanvarshney01.mybettertapp"
|
|
36
|
-
},
|
|
37
|
-
"android": {
|
|
38
|
-
"adaptiveIcon": {
|
|
39
|
-
"foregroundImage": "./assets/adaptive-icon.png",
|
|
40
|
-
"backgroundColor": "#ffffff"
|
|
41
|
-
},
|
|
42
|
-
"package": "com.amanvarshney01.mybettertapp",
|
|
43
|
-
"edgeToEdgeEnabled": true
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
2
|
-
const { getDefaultConfig } = require("expo/metro-config");
|
|
3
|
-
const { FileStore } = require("metro-cache");
|
|
4
|
-
const { withNativeWind } = require("nativewind/metro");
|
|
5
|
-
const path = require("node:path");
|
|
6
|
-
|
|
7
|
-
const config = withTurborepoManagedCache(
|
|
8
|
-
withMonorepoPaths(
|
|
9
|
-
withNativeWind(getDefaultConfig(__dirname), {
|
|
10
|
-
input: "./global.css",
|
|
11
|
-
configPath: "./tailwind.config.js",
|
|
12
|
-
}),
|
|
13
|
-
),
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
config.resolver.unstable_enablePackageExports = true;
|
|
17
|
-
|
|
18
|
-
config.resolver.disableHierarchicalLookup = true;
|
|
19
|
-
|
|
20
|
-
module.exports = config;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Add the monorepo paths to the Metro config.
|
|
24
|
-
* This allows Metro to resolve modules from the monorepo.
|
|
25
|
-
*
|
|
26
|
-
* @see https://docs.expo.dev/guides/monorepos/#modify-the-metro-config
|
|
27
|
-
* @param {import('expo/metro-config').MetroConfig} config
|
|
28
|
-
* @returns {import('expo/metro-config').MetroConfig}
|
|
29
|
-
*/
|
|
30
|
-
function withMonorepoPaths(config) {
|
|
31
|
-
const projectRoot = __dirname;
|
|
32
|
-
const workspaceRoot = path.resolve(projectRoot, "../..");
|
|
33
|
-
|
|
34
|
-
// #1 - Watch all files in the monorepo
|
|
35
|
-
config.watchFolders = [workspaceRoot];
|
|
36
|
-
|
|
37
|
-
// #2 - Resolve modules within the project's `node_modules` first, then all monorepo modules
|
|
38
|
-
config.resolver.nodeModulesPaths = [
|
|
39
|
-
path.resolve(projectRoot, "node_modules"),
|
|
40
|
-
path.resolve(workspaceRoot, "node_modules"),
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
return config;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Move the Metro cache to the `.cache/metro` folder.
|
|
48
|
-
* If you have any environment variables, you can configure Turborepo to invalidate it when needed.
|
|
49
|
-
*
|
|
50
|
-
* @see https://turbo.build/repo/docs/reference/configuration#env
|
|
51
|
-
* @param {import('expo/metro-config').MetroConfig} config
|
|
52
|
-
* @returns {import('expo/metro-config').MetroConfig}
|
|
53
|
-
*/
|
|
54
|
-
function withTurborepoManagedCache(config) {
|
|
55
|
-
config.cacheStores = [
|
|
56
|
-
new FileStore({ root: path.join(__dirname, ".cache/metro") }),
|
|
57
|
-
];
|
|
58
|
-
return config;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
const { hairlineWidth } = require("nativewind/theme");
|
|
2
|
-
|
|
3
|
-
/** @type {import('tailwindcss').Config} */
|
|
4
|
-
module.exports = {
|
|
5
|
-
darkMode: "class",
|
|
6
|
-
content: ["./app/**/*.{js,ts,tsx}", "./components/**/*.{js,ts,tsx}"],
|
|
7
|
-
|
|
8
|
-
presets: [require("nativewind/preset")],
|
|
9
|
-
theme: {
|
|
10
|
-
extend: {
|
|
11
|
-
colors: {
|
|
12
|
-
background: "hsl(var(--background))",
|
|
13
|
-
foreground: "hsl(var(--foreground))",
|
|
14
|
-
card: {
|
|
15
|
-
DEFAULT: "hsl(var(--card))",
|
|
16
|
-
foreground: "hsl(var(--card-foreground))",
|
|
17
|
-
},
|
|
18
|
-
popover: {
|
|
19
|
-
DEFAULT: "hsl(var(--popover))",
|
|
20
|
-
foreground: "hsl(var(--popover-foreground))",
|
|
21
|
-
},
|
|
22
|
-
primary: {
|
|
23
|
-
DEFAULT: "hsl(var(--primary))",
|
|
24
|
-
foreground: "hsl(var(--primary-foreground))",
|
|
25
|
-
},
|
|
26
|
-
secondary: {
|
|
27
|
-
DEFAULT: "hsl(var(--secondary))",
|
|
28
|
-
foreground: "hsl(var(--secondary-foreground))",
|
|
29
|
-
},
|
|
30
|
-
muted: {
|
|
31
|
-
DEFAULT: "hsl(var(--muted))",
|
|
32
|
-
foreground: "hsl(var(--muted-foreground))",
|
|
33
|
-
},
|
|
34
|
-
accent: {
|
|
35
|
-
DEFAULT: "hsl(var(--accent))",
|
|
36
|
-
foreground: "hsl(var(--accent-foreground))",
|
|
37
|
-
},
|
|
38
|
-
destructive: {
|
|
39
|
-
DEFAULT: "hsl(var(--destructive))",
|
|
40
|
-
foreground: "hsl(var(--destructive-foreground))",
|
|
41
|
-
},
|
|
42
|
-
border: "hsl(var(--border))",
|
|
43
|
-
input: "hsl(var(--input))",
|
|
44
|
-
ring: "hsl(var(--ring))",
|
|
45
|
-
radius: "var(--radius)",
|
|
46
|
-
},
|
|
47
|
-
borderRadius: {
|
|
48
|
-
xl: "calc(var(--radius) + 4px)",
|
|
49
|
-
lg: "var(--radius)",
|
|
50
|
-
md: "calc(var(--radius) - 2px)",
|
|
51
|
-
sm: "calc(var(--radius) - 4px)",
|
|
52
|
-
},
|
|
53
|
-
borderWidth: {
|
|
54
|
-
hairline: hairlineWidth(),
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
plugins: [],
|
|
59
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ScrollViewStyleReset } from 'expo-router/html';
|
|
2
|
-
|
|
3
|
-
import '../unistyles';
|
|
4
|
-
|
|
5
|
-
// This file is web-only and used to configure the root HTML for every
|
|
6
|
-
// web page during static rendering.
|
|
7
|
-
// The contents of this function only run in Node.js environments and
|
|
8
|
-
// do not have access to the DOM or browser APIs.
|
|
9
|
-
export default function Root({ children }: { children: React.ReactNode }) {
|
|
10
|
-
return (
|
|
11
|
-
<html lang="en">
|
|
12
|
-
<head>
|
|
13
|
-
<meta charSet="utf-8" />
|
|
14
|
-
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
|
15
|
-
|
|
16
|
-
{/*
|
|
17
|
-
This viewport disables scaling which makes the mobile website act more like a native app.
|
|
18
|
-
However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
|
|
19
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
20
|
-
*/}
|
|
21
|
-
<meta
|
|
22
|
-
name="viewport"
|
|
23
|
-
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
|
|
24
|
-
/>
|
|
25
|
-
{/*
|
|
26
|
-
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
|
27
|
-
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
|
|
28
|
-
*/}
|
|
29
|
-
<ScrollViewStyleReset />
|
|
30
|
-
|
|
31
|
-
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
|
|
32
|
-
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
|
|
33
|
-
{/* Add any additional <head> elements that you want globally available on web... */}
|
|
34
|
-
</head>
|
|
35
|
-
<body>{children}</body>
|
|
36
|
-
</html>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const responsiveBackground = `
|
|
41
|
-
body {
|
|
42
|
-
background-color: #fff;
|
|
43
|
-
}
|
|
44
|
-
@media (prefers-color-scheme: dark) {
|
|
45
|
-
body {
|
|
46
|
-
background-color: #000;
|
|
47
|
-
}
|
|
48
|
-
}`;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"expo": {
|
|
3
|
-
"name": "my-better-t-app",
|
|
4
|
-
"slug": "my-better-t-app",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"newArchEnabled": true,
|
|
7
|
-
"scheme": "my-better-t-app",
|
|
8
|
-
"web": {
|
|
9
|
-
"bundler": "metro",
|
|
10
|
-
"output": "static",
|
|
11
|
-
"favicon": "./assets/favicon.png"
|
|
12
|
-
},
|
|
13
|
-
"plugins": [
|
|
14
|
-
"expo-router",
|
|
15
|
-
"react-native-edge-to-edge",
|
|
16
|
-
"expo-secure-store"
|
|
17
|
-
],
|
|
18
|
-
"experiments": {
|
|
19
|
-
"typedRoutes": true,
|
|
20
|
-
"tsconfigPaths": true,
|
|
21
|
-
"reactCompiler": true
|
|
22
|
-
},
|
|
23
|
-
"orientation": "portrait",
|
|
24
|
-
"icon": "./assets/icon.png",
|
|
25
|
-
"userInterfaceStyle": "automatic",
|
|
26
|
-
"splash": {
|
|
27
|
-
"image": "./assets/splash.png",
|
|
28
|
-
"resizeMode": "contain",
|
|
29
|
-
"backgroundColor": "#ffffff"
|
|
30
|
-
},
|
|
31
|
-
"assetBundlePatterns": ["**/*"],
|
|
32
|
-
"ios": {
|
|
33
|
-
"supportsTablet": true,
|
|
34
|
-
"bundleIdentifier": "com.amanvarshney01.mybettertapp"
|
|
35
|
-
},
|
|
36
|
-
"android": {
|
|
37
|
-
"adaptiveIcon": {
|
|
38
|
-
"foregroundImage": "./assets/adaptive-icon.png",
|
|
39
|
-
"backgroundColor": "#ffffff"
|
|
40
|
-
},
|
|
41
|
-
"package": "com.amanvarshney01.mybettertapp"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|