create-croissant 0.1.49 → 0.1.51

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 (35) hide show
  1. package/package.json +1 -1
  2. package/template/apps/desktop/electron.vite.config.ts +11 -1
  3. package/template/apps/desktop/package.json +15 -1
  4. package/template/apps/desktop/src/renderer/index.html +1 -1
  5. package/template/apps/desktop/src/renderer/src/components/app-sidebar.tsx +186 -0
  6. package/template/apps/desktop/src/renderer/src/components/login-form.tsx +158 -0
  7. package/template/apps/desktop/src/renderer/src/components/signup-form.tsx +205 -0
  8. package/template/apps/desktop/src/renderer/src/env.d.ts +5 -0
  9. package/template/apps/desktop/src/renderer/src/lib/auth-client.ts +3 -0
  10. package/template/apps/desktop/src/renderer/src/lib/orpc.ts +12 -0
  11. package/template/apps/desktop/src/renderer/src/main.tsx +15 -4
  12. package/template/apps/desktop/src/renderer/src/routeTree.gen.ts +240 -0
  13. package/template/apps/desktop/src/renderer/src/routes/__root.tsx +29 -0
  14. package/template/apps/desktop/src/renderer/src/routes/_auth/account.tsx +267 -0
  15. package/template/apps/desktop/src/renderer/src/routes/_auth/dashboard.tsx +46 -0
  16. package/template/apps/desktop/src/renderer/src/routes/_auth/examples/client-orpc-auth.tsx +35 -0
  17. package/template/apps/desktop/src/renderer/src/routes/_auth.tsx +35 -0
  18. package/template/apps/desktop/src/renderer/src/routes/_public/examples/client-orpc.tsx +310 -0
  19. package/template/apps/desktop/src/renderer/src/routes/_public/index.tsx +54 -0
  20. package/template/apps/desktop/src/renderer/src/routes/_public/login.tsx +16 -0
  21. package/template/apps/desktop/src/renderer/src/routes/_public/signup.tsx +16 -0
  22. package/template/apps/desktop/src/renderer/src/routes/_public.tsx +23 -0
  23. package/template/apps/desktop/tsconfig.web.json +1 -0
  24. package/template/apps/mobile/package.json +4 -3
  25. package/template/apps/platform/package.json +5 -8
  26. package/template/apps/platform/src/components/login-form.tsx +9 -5
  27. package/template/apps/platform/src/components/signup-form.tsx +12 -8
  28. package/template/apps/platform/src/routes/_public/examples/client-orpc.tsx +13 -12
  29. package/template/apps/platform/src/routes/_public/examples/ssr-orpc.tsx +12 -8
  30. package/template/package.json +11 -10
  31. package/template/packages/auth/package.json +1 -2
  32. package/template/packages/orpc/package.json +2 -0
  33. package/template/packages/ui/package.json +3 -2
  34. package/template/packages/ui/src/components/input-otp.tsx +14 -3
  35. package/template/apps/desktop/src/renderer/src/App.tsx +0 -35
@@ -21,21 +21,22 @@
21
21
  "prepare": "husky"
22
22
  },
23
23
  "dependencies": {
24
- "react": "19.2.5",
25
- "react-dom": "19.2.5"
24
+ "@orpc/client": "latest",
25
+ "@orpc/server": "latest",
26
+ "@orpc/tanstack-query": "latest",
27
+ "@tanstack/react-form": "latest",
28
+ "@tanstack/react-query": "latest",
29
+ "better-auth": "^1.6.11"
26
30
  },
27
31
  "devDependencies": {
28
- "@better-auth/core": "^1.6.9",
29
- "@types/react": "^19.2.7",
30
- "@types/react-dom": "^19.2.3",
32
+ "@better-auth/core": "^1.6.11",
31
33
  "husky": "latest",
32
34
  "oxfmt": "latest",
33
35
  "oxlint": "latest",
34
- "portless": "^0.11.0",
35
- "turbo": "^2.9.6",
36
+ "portless": "latest",
37
+ "turbo": "latest",
36
38
  "typescript": "6.0.3",
37
- "vite": "^8.0.10",
38
- "zod": "4.3.6"
39
+ "zod": "latest"
39
40
  },
40
41
  "pnpm": {
41
42
  "onlyBuiltDependencies": [
@@ -51,5 +52,5 @@
51
52
  "engines": {
52
53
  "node": ">=20"
53
54
  },
54
- "packageManager": "pnpm@11.1.0"
55
+ "packageManager": "pnpm@11.1.2"
55
56
  }
@@ -12,8 +12,7 @@
12
12
  "generate": "better-auth generate --output ../db/src/lib/auth-schema.ts"
13
13
  },
14
14
  "dependencies": {
15
- "@workspace/db": "workspace:*",
16
- "better-auth": "^1.6.9"
15
+ "@workspace/db": "workspace:*"
17
16
  },
18
17
  "devDependencies": {
19
18
  "@better-auth/cli": "^1.4.22",
@@ -24,6 +24,8 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^22.19.1",
27
+ "@types/react": "^19.2.14",
28
+ "@types/react-dom": "^19.2.3",
27
29
  "@workspace/config-typescript": "workspace:*"
28
30
  }
29
31
  }
@@ -7,6 +7,7 @@
7
7
  "./globals.css": "./src/styles/globals.css",
8
8
  "./lib/*": "./src/lib/*.ts",
9
9
  "./components/*": "./src/components/*.tsx",
10
+ "./commons/*": "./src/commons/*.tsx",
10
11
  "./hooks/*": "./src/hooks/*.ts"
11
12
  },
12
13
  "scripts": {
@@ -15,6 +16,7 @@
15
16
  "dependencies": {
16
17
  "@base-ui/react": "^1.4.1",
17
18
  "@fontsource-variable/geist": "^5.2.8",
19
+ "@tanstack/react-router": "^1.168.24",
18
20
  "class-variance-authority": "^0.7.1",
19
21
  "clsx": "^2.1.1",
20
22
  "cmdk": "^1.1.1",
@@ -32,8 +34,7 @@
32
34
  "sonner": "^2.0.7",
33
35
  "tailwind-merge": "^3.5.0",
34
36
  "tw-animate-css": "^1.4.0",
35
- "vaul": "^1.1.2",
36
- "@tanstack/react-router": "^1.168.24"
37
+ "vaul": "^1.1.2"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@tailwindcss/vite": "^4.2.4",
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { OTPInput, OTPInputContext } from "input-otp";
2
+ import { OTPInput, OTPInputContext, type RenderProps } from "input-otp";
3
3
 
4
4
  import { MinusIcon } from "lucide-react";
5
5
  import { cn } from "@workspace/ui/lib/utils";
@@ -45,8 +45,19 @@ function InputOTPSlot({
45
45
  }: React.ComponentProps<"div"> & {
46
46
  index: number;
47
47
  }) {
48
- const inputOTPContext = React.useContext(OTPInputContext);
49
- const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
48
+ const inputOTPContext = React.useContext(OTPInputContext) as RenderProps | null;
49
+
50
+ if (!inputOTPContext) {
51
+ return null;
52
+ }
53
+
54
+ const slot = inputOTPContext.slots[index];
55
+
56
+ if (!slot) {
57
+ return null;
58
+ }
59
+
60
+ const { char, hasFakeCaret, isActive } = slot;
50
61
 
51
62
  return (
52
63
  <div
@@ -1,35 +0,0 @@
1
- import Versions from "./components/Versions";
2
- import electronLogo from "./assets/electron.svg";
3
-
4
- function App(): React.JSX.Element {
5
- const ipcHandle = (): void => window.electron.ipcRenderer.send("ping");
6
-
7
- return (
8
- <>
9
- <img alt="logo" className="logo" src={electronLogo} />
10
- <div className="creator">Powered by electron-vite</div>
11
- <div className="text">
12
- Build an Electron app with <span className="react">React</span>
13
- &nbsp;and <span className="ts">TypeScript</span>
14
- </div>
15
- <p className="tip">
16
- Please try pressing <code>F12</code> to open the devTool
17
- </p>
18
- <div className="actions">
19
- <div className="action">
20
- <a href="https://electron-vite.org/" target="_blank" rel="noreferrer">
21
- Documentation
22
- </a>
23
- </div>
24
- <div className="action">
25
- <a target="_blank" rel="noreferrer" onClick={ipcHandle}>
26
- Send IPC
27
- </a>
28
- </div>
29
- </div>
30
- <Versions></Versions>
31
- </>
32
- );
33
- }
34
-
35
- export default App;