create-croissant 0.1.43 → 0.1.45
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/add.js +25 -0
- package/dist/index.js +20 -7
- package/package.json +5 -4
- package/template/.expo/README.md +13 -0
- package/template/.expo/devices.json +3 -0
- package/template/apps/desktop/.eslintcache +1 -0
- package/template/apps/mobile/app/(tabs)/_layout.tsx +21 -14
- package/template/apps/mobile/app/(tabs)/account.tsx +147 -0
- package/template/apps/mobile/app/(tabs)/explore.tsx +334 -104
- package/template/apps/mobile/app/(tabs)/index.tsx +102 -85
- package/template/apps/mobile/app/_layout.tsx +26 -7
- package/template/apps/mobile/app/index.tsx +136 -0
- package/template/apps/mobile/app/login.tsx +135 -0
- package/template/apps/mobile/app/signup.tsx +144 -0
- package/template/apps/mobile/app.json +3 -3
- package/template/apps/mobile/components/ui/button.tsx +86 -0
- package/template/apps/mobile/components/ui/input.tsx +56 -0
- package/template/apps/mobile/lib/auth-client.ts +14 -0
- package/template/apps/mobile/lib/orpc.ts +23 -0
- package/template/apps/mobile/package.json +17 -2
- package/template/apps/mobile/tsconfig.json +4 -1
- package/template/apps/platform/package.json +2 -1
- package/template/apps/platform/src/components/login-form.tsx +5 -4
- package/template/apps/platform/src/components/signup-form.tsx +12 -16
- package/template/apps/platform/src/routeTree.gen.ts +267 -264
- package/template/apps/platform/src/routes/__root.tsx +6 -2
- package/template/apps/platform/src/routes/_auth/account.tsx +13 -17
- package/template/apps/platform/src/routes/_auth/examples/client-orpc-auth.tsx +2 -6
- package/template/apps/platform/src/routes/_public/examples/client-orpc.tsx +16 -29
- package/template/apps/platform/src/routes/_public/examples/ssr-orpc.tsx +10 -14
- package/template/apps/platform/src/routes/api/auth/$.ts +23 -2
- package/template/apps/platform/src/routes/api/rpc.$.ts +18 -0
- package/template/package.json +2 -4
- package/template/packages/orpc/package.json +7 -1
- package/template/packages/orpc/src/lib/planets.ts +18 -18
- package/template/packages/orpc/src/lib/router.ts +3 -3
- package/template/packages/orpc/src/react/context.tsx +23 -0
- package/template/packages/orpc/src/react/general.ts +29 -0
- package/template/packages/orpc/src/react/index.ts +3 -0
- package/template/packages/orpc/src/react/planets.ts +90 -0
- package/template/tsconfig.json +2 -1
- package/template/apps/mobile/app/modal.tsx +0 -29
|
@@ -13,17 +13,28 @@
|
|
|
13
13
|
"build": "expo export --output-dir .output"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
+
"@better-auth/expo": "^1.6.9",
|
|
16
17
|
"@expo/vector-icons": "^15.0.3",
|
|
18
|
+
"@orpc/client": "^1.14.0",
|
|
19
|
+
"@orpc/server": "^1.14.0",
|
|
20
|
+
"@orpc/tanstack-query": "^1.14.0",
|
|
17
21
|
"@react-navigation/bottom-tabs": "^7.4.0",
|
|
18
22
|
"@react-navigation/elements": "^2.6.3",
|
|
19
23
|
"@react-navigation/native": "^7.1.8",
|
|
24
|
+
"@tanstack/react-form": "^1.29.1",
|
|
25
|
+
"@tanstack/react-query": "^5.100.5",
|
|
26
|
+
"@workspace/orpc": "^0.0.0",
|
|
27
|
+
"@workspace/ui": "^0.0.0",
|
|
28
|
+
"better-auth": "^1.6.9",
|
|
20
29
|
"expo": "^55.0.17",
|
|
21
30
|
"expo-constants": "~55.0.15",
|
|
22
31
|
"expo-font": "~55.0.6",
|
|
23
32
|
"expo-haptics": "~55.0.14",
|
|
24
33
|
"expo-image": "~55.0.9",
|
|
25
34
|
"expo-linking": "~55.0.14",
|
|
35
|
+
"expo-network": "^55.0.13",
|
|
26
36
|
"expo-router": "~55.0.13",
|
|
37
|
+
"expo-secure-store": "^55.0.13",
|
|
27
38
|
"expo-splash-screen": "~55.0.19",
|
|
28
39
|
"expo-status-bar": "~55.0.5",
|
|
29
40
|
"expo-symbols": "~55.0.7",
|
|
@@ -35,7 +46,11 @@
|
|
|
35
46
|
"react-native-safe-area-context": "~5.6.0",
|
|
36
47
|
"react-native-screens": "~4.23.0",
|
|
37
48
|
"react-native-web": "~0.21.0",
|
|
38
|
-
"react-native-worklets": "0.7.4"
|
|
49
|
+
"react-native-worklets": "0.7.4",
|
|
50
|
+
"zod": "4.3.6"
|
|
39
51
|
},
|
|
40
|
-
"devDependencies": {
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"babel-plugin-transform-import-meta": "^2.3.3",
|
|
54
|
+
"metro-react-native-babel-transformer": "^0.77.0"
|
|
55
|
+
}
|
|
41
56
|
}
|
|
@@ -18,12 +18,13 @@ import { Input } from "@workspace/ui/components/input";
|
|
|
18
18
|
import { useState } from "react";
|
|
19
19
|
import { Link } from "@tanstack/react-router";
|
|
20
20
|
import { useForm } from "@tanstack/react-form";
|
|
21
|
-
import {
|
|
21
|
+
import { z } from "zod";
|
|
22
|
+
|
|
22
23
|
import { authClient } from "@/lib/auth-client";
|
|
23
24
|
|
|
24
|
-
const loginSchema =
|
|
25
|
-
email:
|
|
26
|
-
password:
|
|
25
|
+
const loginSchema = z.object({
|
|
26
|
+
email: z.string().email("Invalid email address"),
|
|
27
|
+
password: z.string().min(8, "Password must be at least 8 characters"),
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
export function LoginForm({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -17,24 +17,20 @@ import { Input } from "@workspace/ui/components/input";
|
|
|
17
17
|
import { useState } from "react";
|
|
18
18
|
import { Link } from "@tanstack/react-router";
|
|
19
19
|
import { useForm } from "@tanstack/react-form";
|
|
20
|
-
import {
|
|
20
|
+
import { z } from "zod";
|
|
21
21
|
import { authClient } from "@/lib/auth-client";
|
|
22
22
|
|
|
23
|
-
const signupSchema =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
return true;
|
|
37
|
-
});
|
|
23
|
+
const signupSchema = z
|
|
24
|
+
.object({
|
|
25
|
+
name: z.string().min(1, "Name is required"),
|
|
26
|
+
email: z.string().email("Invalid email address"),
|
|
27
|
+
password: z.string().min(8, "Password must be at least 8 characters"),
|
|
28
|
+
confirmPassword: z.string().min(1, "Confirm password is required"),
|
|
29
|
+
})
|
|
30
|
+
.refine((data) => data.password === data.confirmPassword, {
|
|
31
|
+
message: "Passwords do not match",
|
|
32
|
+
path: ["confirmPassword"],
|
|
33
|
+
});
|
|
38
34
|
|
|
39
35
|
export function SignupForm({ ...props }: React.ComponentProps<typeof Card>) {
|
|
40
36
|
const [loading, setLoading] = useState(false);
|