@presencenet/create-pnet-stack 0.2.3 → 0.4.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.
Files changed (56) hide show
  1. package/bin/create-pnet-stack.js +79 -8
  2. package/package.json +1 -1
  3. package/templates/electron/apps/app/components.json +23 -0
  4. package/templates/electron/apps/app/package.json +7 -0
  5. package/templates/electron/apps/app/src/preload/index.ts +3 -1
  6. package/templates/electron/apps/app/src/renderer/index.html +1 -1
  7. package/templates/electron/apps/app/src/renderer/src/components/ui/button.tsx +63 -0
  8. package/templates/electron/apps/app/src/renderer/src/components/ui/card.tsx +91 -0
  9. package/templates/electron/apps/app/src/renderer/src/lib/utils.ts +1 -0
  10. package/templates/electron/apps/app/src/renderer/src/main.tsx +31 -8
  11. package/templates/electron/apps/app/src/renderer/src/style.css +120 -4
  12. package/templates/electron/apps/app/tsconfig.json +16 -0
  13. package/templates/electron/biome.json +26 -3
  14. package/templates/electron/gitignore +1 -0
  15. package/templates/electron/package.json +0 -1
  16. package/templates/mobile/apps/app/app/_layout.tsx +10 -9
  17. package/templates/mobile/apps/app/app/index.tsx +37 -11
  18. package/templates/mobile/apps/app/app.json +4 -1
  19. package/templates/mobile/apps/app/components/ui/button.tsx +123 -0
  20. package/templates/mobile/apps/app/components/ui/card.tsx +85 -0
  21. package/templates/mobile/apps/app/components/ui/text.tsx +95 -0
  22. package/templates/mobile/apps/app/components.json +19 -0
  23. package/templates/mobile/apps/app/css.d.ts +1 -0
  24. package/templates/mobile/apps/app/global.css +55 -0
  25. package/templates/mobile/apps/app/lib/theme.ts +85 -0
  26. package/templates/mobile/apps/app/lib/utils.ts +6 -0
  27. package/templates/mobile/apps/app/metro.config.js +1 -0
  28. package/templates/mobile/apps/app/package.json +11 -2
  29. package/templates/mobile/apps/app/tailwind.config.js +69 -3
  30. package/templates/mobile/biome.json +26 -3
  31. package/templates/mobile/package.json +0 -1
  32. package/templates/tauri/apps/app/components.json +23 -0
  33. package/templates/tauri/apps/app/index.html +1 -1
  34. package/templates/tauri/apps/app/package.json +8 -1
  35. package/templates/tauri/apps/app/src/components/ui/button.tsx +63 -0
  36. package/templates/tauri/apps/app/src/components/ui/card.tsx +91 -0
  37. package/templates/tauri/apps/app/src/lib/utils.ts +1 -0
  38. package/templates/tauri/apps/app/src/main.tsx +31 -8
  39. package/templates/tauri/apps/app/src/style.css +120 -4
  40. package/templates/tauri/apps/app/src-tauri/tauri.conf.json +7 -1
  41. package/templates/tauri/apps/app/tsconfig.json +6 -2
  42. package/templates/tauri/apps/app/vite.config.ts +4 -0
  43. package/templates/tauri/biome.json +26 -3
  44. package/templates/tauri/package.json +0 -1
  45. package/templates/web/apps/app/components.json +23 -0
  46. package/templates/web/apps/app/package.json +7 -0
  47. package/templates/web/apps/app/src/components/ui/button.tsx +63 -0
  48. package/templates/web/apps/app/src/components/ui/card.tsx +91 -0
  49. package/templates/web/apps/app/src/lib/utils.ts +1 -0
  50. package/templates/web/apps/app/src/routes/__root.tsx +7 -3
  51. package/templates/web/apps/app/src/routes/index.tsx +31 -8
  52. package/templates/web/apps/app/src/styles.css +123 -0
  53. package/templates/web/apps/app/tsconfig.json +4 -1
  54. package/templates/web/apps/app/vite.config.ts +4 -0
  55. package/templates/web/biome.json +29 -3
  56. package/templates/web/package.json +0 -1
@@ -0,0 +1,91 @@
1
+ import { cn } from "cn";
2
+ import type * as React from "react";
3
+
4
+ function Card({ className, ...props }: React.ComponentProps<"div">) {
5
+ return (
6
+ <div
7
+ data-slot="card"
8
+ className={cn(
9
+ "flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",
10
+ className,
11
+ )}
12
+ {...props}
13
+ />
14
+ );
15
+ }
16
+
17
+ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
18
+ return (
19
+ <div
20
+ data-slot="card-header"
21
+ className={cn(
22
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
23
+ className,
24
+ )}
25
+ {...props}
26
+ />
27
+ );
28
+ }
29
+
30
+ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
31
+ return (
32
+ <div
33
+ data-slot="card-title"
34
+ className={cn("leading-none font-semibold", className)}
35
+ {...props}
36
+ />
37
+ );
38
+ }
39
+
40
+ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
41
+ return (
42
+ <div
43
+ data-slot="card-description"
44
+ className={cn("text-sm text-muted-foreground", className)}
45
+ {...props}
46
+ />
47
+ );
48
+ }
49
+
50
+ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
51
+ return (
52
+ <div
53
+ data-slot="card-action"
54
+ className={cn(
55
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
56
+ className,
57
+ )}
58
+ {...props}
59
+ />
60
+ );
61
+ }
62
+
63
+ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
64
+ return (
65
+ <div
66
+ data-slot="card-content"
67
+ className={cn("px-6", className)}
68
+ {...props}
69
+ />
70
+ );
71
+ }
72
+
73
+ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
74
+ return (
75
+ <div
76
+ data-slot="card-footer"
77
+ className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
78
+ {...props}
79
+ />
80
+ );
81
+ }
82
+
83
+ export {
84
+ Card,
85
+ CardAction,
86
+ CardContent,
87
+ CardDescription,
88
+ CardFooter,
89
+ CardHeader,
90
+ CardTitle,
91
+ };
@@ -0,0 +1 @@
1
+ export { cn } from "cn";
@@ -6,21 +6,25 @@ import {
6
6
  } from "@tanstack/react-router";
7
7
  import "../styles.css";
8
8
 
9
+ const app = {
10
+ name: "{{projectName}}",
11
+ };
12
+
9
13
  export const Route = createRootRoute({
10
14
  head: () => ({
11
15
  meta: [
12
16
  { charSet: "utf-8" },
13
17
  { name: "viewport", content: "width=device-width, initial-scale=1" },
14
- { title: "{{projectName}}" },
18
+ { title: app.name },
15
19
  { name: "description", content: "A Presence-Net app" },
16
20
  ],
17
21
  }),
18
22
  component: () => (
19
- <html lang="en">
23
+ <html lang="en" className="dark">
20
24
  <head>
21
25
  <HeadContent />
22
26
  </head>
23
- <body className="min-h-screen bg-slate-950 text-white antialiased">
27
+ <body className="min-h-screen antialiased">
24
28
  <Outlet />
25
29
  <Scripts />
26
30
  </body>
@@ -1,4 +1,17 @@
1
1
  import { createFileRoute } from "@tanstack/react-router";
2
+ import { Button } from "@/components/ui/button";
3
+ import {
4
+ Card,
5
+ CardContent,
6
+ CardDescription,
7
+ CardFooter,
8
+ CardHeader,
9
+ CardTitle,
10
+ } from "@/components/ui/card";
11
+
12
+ const app = {
13
+ name: "{{projectName}}",
14
+ };
2
15
 
3
16
  export const Route = createFileRoute("/")({
4
17
  component: Home,
@@ -6,14 +19,24 @@ export const Route = createFileRoute("/")({
6
19
 
7
20
  function Home() {
8
21
  return (
9
- <main className="mx-auto flex min-h-screen max-w-3xl flex-col justify-center px-8">
10
- <p className="mb-3 text-sm font-semibold uppercase tracking-[0.2em] text-cyan-300">
11
- Presence-Net starter
12
- </p>
13
- <h1 className="text-5xl font-bold tracking-tight">{"{{projectName}}"}</h1>
14
- <p className="mt-5 max-w-xl text-lg text-slate-300">
15
- TanStack Start, Tailwind CSS, and a Bun-powered Turborepo workspace.
16
- </p>
22
+ <main className="flex min-h-screen items-center justify-center p-8">
23
+ <Card className="w-full max-w-xl">
24
+ <CardHeader>
25
+ <CardDescription>Presence-Net starter</CardDescription>
26
+ <CardTitle className="text-4xl tracking-tight">{app.name}</CardTitle>
27
+ </CardHeader>
28
+ <CardContent className="text-muted-foreground">
29
+ TanStack Start, Tailwind CSS, shadcn/ui, and a Bun-powered Turborepo
30
+ workspace.
31
+ </CardContent>
32
+ <CardFooter>
33
+ <Button asChild>
34
+ <a href="https://ui.shadcn.com/docs/components">
35
+ Browse components
36
+ </a>
37
+ </Button>
38
+ </CardFooter>
39
+ </Card>
17
40
  </main>
18
41
  );
19
42
  }
@@ -1 +1,124 @@
1
1
  @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+ @import "shadcn/tailwind.css";
4
+
5
+ @custom-variant dark (&:is(.dark *));
6
+
7
+ :root {
8
+ --radius: 0.625rem;
9
+ --background: oklch(1 0 0);
10
+ --foreground: oklch(0.145 0 0);
11
+ --card: oklch(1 0 0);
12
+ --card-foreground: oklch(0.145 0 0);
13
+ --popover: oklch(1 0 0);
14
+ --popover-foreground: oklch(0.145 0 0);
15
+ --primary: oklch(0.205 0 0);
16
+ --primary-foreground: oklch(0.985 0 0);
17
+ --secondary: oklch(0.97 0 0);
18
+ --secondary-foreground: oklch(0.205 0 0);
19
+ --muted: oklch(0.97 0 0);
20
+ --muted-foreground: oklch(0.556 0 0);
21
+ --accent: oklch(0.97 0 0);
22
+ --accent-foreground: oklch(0.205 0 0);
23
+ --destructive: oklch(0.577 0.245 27.325);
24
+ --border: oklch(0.922 0 0);
25
+ --input: oklch(0.922 0 0);
26
+ --ring: oklch(0.708 0 0);
27
+ --chart-1: oklch(0.87 0 0);
28
+ --chart-2: oklch(0.556 0 0);
29
+ --chart-3: oklch(0.439 0 0);
30
+ --chart-4: oklch(0.371 0 0);
31
+ --chart-5: oklch(0.269 0 0);
32
+ --sidebar: oklch(0.985 0 0);
33
+ --sidebar-foreground: oklch(0.145 0 0);
34
+ --sidebar-primary: oklch(0.205 0 0);
35
+ --sidebar-primary-foreground: oklch(0.985 0 0);
36
+ --sidebar-accent: oklch(0.97 0 0);
37
+ --sidebar-accent-foreground: oklch(0.205 0 0);
38
+ --sidebar-border: oklch(0.922 0 0);
39
+ --sidebar-ring: oklch(0.708 0 0);
40
+ }
41
+
42
+ @theme inline {
43
+ --radius-sm: calc(var(--radius) * 0.6);
44
+ --radius-md: calc(var(--radius) * 0.8);
45
+ --radius-lg: var(--radius);
46
+ --radius-xl: calc(var(--radius) * 1.4);
47
+ --radius-2xl: calc(var(--radius) * 1.8);
48
+ --radius-3xl: calc(var(--radius) * 2.2);
49
+ --radius-4xl: calc(var(--radius) * 2.6);
50
+ --color-background: var(--background);
51
+ --color-foreground: var(--foreground);
52
+ --color-card: var(--card);
53
+ --color-card-foreground: var(--card-foreground);
54
+ --color-popover: var(--popover);
55
+ --color-popover-foreground: var(--popover-foreground);
56
+ --color-primary: var(--primary);
57
+ --color-primary-foreground: var(--primary-foreground);
58
+ --color-secondary: var(--secondary);
59
+ --color-secondary-foreground: var(--secondary-foreground);
60
+ --color-muted: var(--muted);
61
+ --color-muted-foreground: var(--muted-foreground);
62
+ --color-accent: var(--accent);
63
+ --color-accent-foreground: var(--accent-foreground);
64
+ --color-destructive: var(--destructive);
65
+ --color-border: var(--border);
66
+ --color-input: var(--input);
67
+ --color-ring: var(--ring);
68
+ --color-chart-1: var(--chart-1);
69
+ --color-chart-2: var(--chart-2);
70
+ --color-chart-3: var(--chart-3);
71
+ --color-chart-4: var(--chart-4);
72
+ --color-chart-5: var(--chart-5);
73
+ --color-sidebar: var(--sidebar);
74
+ --color-sidebar-foreground: var(--sidebar-foreground);
75
+ --color-sidebar-primary: var(--sidebar-primary);
76
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
77
+ --color-sidebar-accent: var(--sidebar-accent);
78
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
79
+ --color-sidebar-border: var(--sidebar-border);
80
+ --color-sidebar-ring: var(--sidebar-ring);
81
+ }
82
+
83
+ .dark {
84
+ --background: oklch(0.145 0 0);
85
+ --foreground: oklch(0.985 0 0);
86
+ --card: oklch(0.205 0 0);
87
+ --card-foreground: oklch(0.985 0 0);
88
+ --popover: oklch(0.205 0 0);
89
+ --popover-foreground: oklch(0.985 0 0);
90
+ --primary: oklch(0.922 0 0);
91
+ --primary-foreground: oklch(0.205 0 0);
92
+ --secondary: oklch(0.269 0 0);
93
+ --secondary-foreground: oklch(0.985 0 0);
94
+ --muted: oklch(0.269 0 0);
95
+ --muted-foreground: oklch(0.708 0 0);
96
+ --accent: oklch(0.269 0 0);
97
+ --accent-foreground: oklch(0.985 0 0);
98
+ --destructive: oklch(0.704 0.191 22.216);
99
+ --border: oklch(1 0 0 / 10%);
100
+ --input: oklch(1 0 0 / 15%);
101
+ --ring: oklch(0.556 0 0);
102
+ --chart-1: oklch(0.87 0 0);
103
+ --chart-2: oklch(0.556 0 0);
104
+ --chart-3: oklch(0.439 0 0);
105
+ --chart-4: oklch(0.371 0 0);
106
+ --chart-5: oklch(0.269 0 0);
107
+ --sidebar: oklch(0.205 0 0);
108
+ --sidebar-foreground: oklch(0.985 0 0);
109
+ --sidebar-primary: oklch(0.488 0.243 264.376);
110
+ --sidebar-primary-foreground: oklch(0.985 0 0);
111
+ --sidebar-accent: oklch(0.269 0 0);
112
+ --sidebar-accent-foreground: oklch(0.985 0 0);
113
+ --sidebar-border: oklch(1 0 0 / 10%);
114
+ --sidebar-ring: oklch(0.556 0 0);
115
+ }
116
+
117
+ @layer base {
118
+ * {
119
+ @apply border-border outline-ring/50;
120
+ }
121
+ body {
122
+ @apply bg-background text-foreground;
123
+ }
124
+ }
@@ -7,7 +7,10 @@
7
7
  "jsx": "react-jsx",
8
8
  "strict": true,
9
9
  "skipLibCheck": true,
10
- "types": ["vite/client"]
10
+ "types": ["vite/client"],
11
+ "paths": {
12
+ "@/*": ["./src/*"]
13
+ }
11
14
  },
12
15
  "include": ["src", "vite.config.ts"]
13
16
  }
@@ -1,8 +1,12 @@
1
+ import { fileURLToPath } from "node:url";
1
2
  import tailwindcss from "@tailwindcss/vite";
2
3
  import { tanstackStart } from "@tanstack/react-start/plugin/vite";
3
4
  import react from "@vitejs/plugin-react";
4
5
  import { defineConfig } from "vite";
5
6
 
6
7
  export default defineConfig({
8
+ resolve: {
9
+ alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) },
10
+ },
7
11
  plugins: [tanstackStart(), react(), tailwindcss()],
8
12
  });
@@ -1,7 +1,33 @@
1
1
  {
2
2
  "root": false,
3
3
  "$schema": "https://biomejs.dev/schemas/2.6.5/schema.json",
4
- "formatter": { "enabled": true, "indentStyle": "space", "indentWidth": 2 },
5
- "linter": { "enabled": true, "rules": { "preset": "recommended" } },
6
- "javascript": { "formatter": { "quoteStyle": "double" } }
4
+ "vcs": {
5
+ "enabled": true,
6
+ "clientKind": "git",
7
+ "useIgnoreFile": true
8
+ },
9
+ "files": {
10
+ "includes": ["**", "!**/routeTree.gen.ts"]
11
+ },
12
+ "formatter": {
13
+ "enabled": true,
14
+ "indentStyle": "space",
15
+ "indentWidth": 2
16
+ },
17
+ "linter": {
18
+ "enabled": true,
19
+ "rules": {
20
+ "preset": "recommended"
21
+ }
22
+ },
23
+ "javascript": {
24
+ "formatter": {
25
+ "quoteStyle": "double"
26
+ }
27
+ },
28
+ "css": {
29
+ "parser": {
30
+ "tailwindDirectives": true
31
+ }
32
+ }
7
33
  }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "{{projectName}}",
3
3
  "private": true,
4
- "packageManager": "bun@1.3.14",
5
4
  "workspaces": [
6
5
  "apps/*",
7
6
  "packages/*"