create-camox 0.1.2-alpha.2 → 0.4.2

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/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # create-camox
2
+
3
+ Scaffolds a new [Camox](https://camox.ai) project.
4
+
5
+ ```bash
6
+ npm create camox
7
+ ```
8
+
9
+ ## Why does this package exist?
10
+
11
+ This is a thin wrapper around `@camox/cli init`. It exists so that `npm create camox` always fetches the latest version of the CLI from the registry, rather than resolving a cached or locally installed copy of the `camox` package. It also avoids downloading the full SDK and its dependencies just to run the init command.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ process.argv.splice(2, 0, "init");
3
+ import "@camox/cli";
package/package.json CHANGED
@@ -1,23 +1,14 @@
1
1
  {
2
2
  "name": "create-camox",
3
- "version": "0.1.2-alpha.2",
3
+ "version": "0.4.2",
4
4
  "bin": {
5
- "create-camox": "./dist/index.js"
5
+ "create-camox": "./bin/create-camox.mjs"
6
6
  },
7
7
  "files": [
8
- "dist",
9
- "template"
8
+ "bin"
10
9
  ],
11
10
  "type": "module",
12
11
  "dependencies": {
13
- "@clack/prompts": "^0.10.0"
14
- },
15
- "devDependencies": {
16
- "tsup": "^8.4.0",
17
- "typescript": "^5.7.2"
18
- },
19
- "scripts": {
20
- "build": "tsup",
21
- "dev": "tsup --watch"
12
+ "@camox/cli": "0.4.2"
22
13
  }
23
14
  }
package/dist/index.js DELETED
@@ -1,195 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/index.ts
4
- import { execSync, spawn, spawnSync } from "child_process";
5
- import fs from "fs";
6
- import path from "path";
7
- import { fileURLToPath } from "url";
8
- import * as p from "@clack/prompts";
9
- var __dirname = path.dirname(fileURLToPath(import.meta.url));
10
- var ownPkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, "..", "package.json"), "utf-8"));
11
- var pmCommands = {
12
- pnpm: { install: "pnpm install", dev: "pnpm dev" },
13
- bun: { install: "bun install", dev: "bun dev" },
14
- npm: { install: "npm install", dev: "npm run dev" },
15
- yarn: { install: "yarn install", dev: "yarn dev" }
16
- };
17
- function slugify(name) {
18
- return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
19
- }
20
- function detectPackageManager() {
21
- const userAgent = process.env.npm_config_user_agent;
22
- if (userAgent) {
23
- const name = userAgent.split("/")[0];
24
- if (name === "pnpm") return "pnpm";
25
- if (name === "bun") return "bun";
26
- if (name === "npm" || name === "npx") return "npm";
27
- if (name === "yarn") return "yarn";
28
- }
29
- let dir = process.cwd();
30
- const root = path.parse(dir).root;
31
- while (true) {
32
- if (fs.existsSync(path.join(dir, "pnpm-lock.yaml")) || fs.existsSync(path.join(dir, "pnpm-workspace.yaml")))
33
- return "pnpm";
34
- if (fs.existsSync(path.join(dir, "bun.lockb")) || fs.existsSync(path.join(dir, "bun.lock")))
35
- return "bun";
36
- if (fs.existsSync(path.join(dir, "package-lock.json"))) return "npm";
37
- if (fs.existsSync(path.join(dir, "yarn.lock"))) return "yarn";
38
- if (dir === root) break;
39
- dir = path.dirname(dir);
40
- }
41
- return null;
42
- }
43
- function isInsideGitRepo() {
44
- try {
45
- execSync("git rev-parse --is-inside-work-tree", { stdio: "ignore" });
46
- return true;
47
- } catch {
48
- return false;
49
- }
50
- }
51
- function copyDir(src, dest, replacements) {
52
- fs.mkdirSync(dest, { recursive: true });
53
- for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
54
- const srcPath = path.join(src, entry.name);
55
- const destPath = path.join(dest, entry.name);
56
- if (entry.isDirectory()) {
57
- copyDir(srcPath, destPath, replacements);
58
- continue;
59
- }
60
- let content = fs.readFileSync(srcPath, "utf-8");
61
- for (const [key, value] of Object.entries(replacements)) {
62
- content = content.replaceAll(key, value);
63
- }
64
- fs.writeFileSync(destPath, content);
65
- }
66
- }
67
- function onCancel() {
68
- p.cancel("Cancelled.");
69
- process.exit(0);
70
- }
71
- async function main() {
72
- p.intro("create-camox");
73
- const result = await p.group(
74
- {
75
- name: () => p.text({
76
- message: "Project display name",
77
- placeholder: "My Website",
78
- validate: (value) => {
79
- if (!value.trim()) return "Project name is required";
80
- }
81
- }),
82
- slug: ({ results }) => p.text({
83
- message: "Project slug",
84
- initialValue: slugify(results.name ?? ""),
85
- validate: (value) => {
86
- if (!value.trim()) return "Slug is required";
87
- if (!/^[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(value) && !/^[a-z0-9]$/.test(value)) {
88
- return "Slug must be lowercase alphanumeric with hyphens";
89
- }
90
- }
91
- }),
92
- path: ({ results }) => p.text({
93
- message: "Project path",
94
- initialValue: `./${results.slug ?? "my-site"}`,
95
- validate: (value) => {
96
- if (!value.trim()) return "Path is required";
97
- }
98
- })
99
- },
100
- { onCancel }
101
- );
102
- const targetDir = path.resolve(result.path);
103
- if (fs.existsSync(targetDir) && fs.readdirSync(targetDir).length > 0) {
104
- p.cancel(`Directory ${targetDir} is not empty.`);
105
- process.exit(1);
106
- }
107
- const alreadyInRepo = isInsideGitRepo();
108
- const initGit = await p.confirm({
109
- message: "Initialize a git repository?",
110
- initialValue: !alreadyInRepo
111
- });
112
- if (p.isCancel(initGit)) return onCancel();
113
- const detected = detectPackageManager();
114
- let pm;
115
- if (detected) {
116
- pm = detected;
117
- p.log.info(`Detected package manager: ${detected}`);
118
- } else {
119
- const selected = await p.select({
120
- message: "Which package manager?",
121
- options: [
122
- { value: "pnpm", label: "pnpm" },
123
- { value: "bun", label: "bun" },
124
- { value: "npm", label: "npm" },
125
- { value: "yarn", label: "yarn" }
126
- ]
127
- });
128
- if (p.isCancel(selected)) return onCancel();
129
- pm = selected;
130
- }
131
- const s = p.spinner();
132
- s.start("Scaffolding project...");
133
- const templateDir = path.resolve(__dirname, "..", "template");
134
- copyDir(templateDir, targetDir, {
135
- "{{projectName}}": result.name,
136
- "{{projectSlug}}": result.slug,
137
- "{{camoxVersion}}": ownPkg.version
138
- });
139
- s.stop("Project scaffolded!");
140
- if (initGit) {
141
- try {
142
- execSync("git init", { cwd: targetDir, stdio: "ignore" });
143
- p.log.success("Initialized git repository.");
144
- } catch {
145
- p.log.warn("Could not initialize git repository.");
146
- }
147
- }
148
- const { install: installCmd, dev: devCmd } = pmCommands[pm];
149
- const [installBin, ...installArgs] = installCmd.split(" ");
150
- const s2 = p.spinner();
151
- s2.start(`Running ${installCmd}...`);
152
- try {
153
- await new Promise((resolve, reject) => {
154
- const child2 = spawn(installBin, installArgs, {
155
- cwd: targetDir,
156
- stdio: "ignore"
157
- });
158
- child2.on("close", (code) => {
159
- if (code === 0) resolve();
160
- else reject(new Error(`Exit code ${code}`));
161
- });
162
- child2.on("error", reject);
163
- });
164
- s2.stop("Dependencies installed!");
165
- } catch {
166
- s2.stop("Install failed.");
167
- p.log.error(`Failed to install dependencies. Run "${installCmd}" manually.`);
168
- process.exit(1);
169
- }
170
- if (initGit) {
171
- try {
172
- execSync("git add -A", { cwd: targetDir, stdio: "ignore" });
173
- execSync('git commit -m "Initial commit from create-camox"', {
174
- cwd: targetDir,
175
- stdio: "ignore"
176
- });
177
- p.log.success("Created initial commit.");
178
- } catch {
179
- p.log.warn("Could not create initial commit.");
180
- }
181
- }
182
- p.outro(`Starting dev server...`);
183
- const [cmd, ...args] = devCmd.split(" ");
184
- const child = spawn(cmd, args, {
185
- cwd: targetDir,
186
- stdio: "inherit"
187
- });
188
- child.on("close", () => {
189
- const shell = process.env.SHELL || "/bin/bash";
190
- p.log.info(`Dropping you into ${result.path}`);
191
- spawnSync(shell, [], { cwd: targetDir, stdio: "inherit" });
192
- process.exit(0);
193
- });
194
- }
195
- main().catch(console.error);
@@ -1,22 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "new-york",
4
- "rsc": false,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "",
8
- "css": "src/styles.css",
9
- "baseColor": "gray",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "iconLibrary": "lucide",
14
- "aliases": {
15
- "components": "@/components",
16
- "utils": "@/lib/utils",
17
- "ui": "@/components/ui",
18
- "lib": "@/lib",
19
- "hooks": "@/hooks"
20
- },
21
- "registries": {}
22
- }
@@ -1,39 +0,0 @@
1
- {
2
- "name": "{{projectSlug}}",
3
- "private": true,
4
- "type": "module",
5
- "scripts": {
6
- "dev": "vite dev --port 3000",
7
- "start": "node .output/server/index.mjs",
8
- "build": "vite build",
9
- "serve": "vite preview",
10
- "lint": "oxlint",
11
- "check": "tsgo --noEmit && oxlint --fix"
12
- },
13
- "dependencies": {
14
- "@radix-ui/react-slot": "^1.2.3",
15
- "@tailwindcss/vite": "^4.2.2",
16
- "@tanstack/react-router": "^1.166.2",
17
- "@tanstack/react-start": "^1.166.2",
18
- "@tanstack/router-plugin": "^1.166.2",
19
- "camox": "{{camoxVersion}}",
20
- "class-variance-authority": "^0.7.1",
21
- "clsx": "^2.1.1",
22
- "lucide-react": "^0.476.0",
23
- "react": "^19.1.0",
24
- "react-dom": "^19.1.0",
25
- "tailwind-merge": "^3.0.2",
26
- "tailwindcss": "^4.0.6"
27
- },
28
- "devDependencies": {
29
- "@types/react": "^19.0.8",
30
- "@types/react-dom": "^19.0.3",
31
- "@typescript/native-preview": "^7.0.0-dev",
32
- "@vitejs/plugin-react": "^6.0.1",
33
- "babel-plugin-react-compiler": "19.1.0-rc.3",
34
- "oxlint": "^0.15.15",
35
- "tw-animate-css": "^1.3.6",
36
- "typescript": "^5.7.2",
37
- "vite": "8.0.1"
38
- }
39
- }
@@ -1,67 +0,0 @@
1
- import { Link } from "@tanstack/react-router";
2
- import { Type, createBlock } from "camox/createBlock";
3
-
4
- const footer = createBlock({
5
- id: "footer",
6
- title: "Footer",
7
- layoutOnly: true,
8
- description: "A footer at the bottom of a page with a site name and navigation links.",
9
- toMarkdown: ["{{title}}", "{{links}}"],
10
- content: {
11
- title: Type.String({ default: "{{projectName}}" }),
12
- links: Type.RepeatableObject(
13
- {
14
- link: Type.Link({
15
- default: { text: "Link", href: "#", newTab: false },
16
- title: "Link",
17
- }),
18
- },
19
- {
20
- minItems: 1,
21
- maxItems: 12,
22
- title: "Links",
23
- toMarkdown: ["{{link}}"],
24
- },
25
- ),
26
- },
27
- component: FooterComponent,
28
- });
29
-
30
- function FooterComponent() {
31
- return (
32
- <footer className="dark bg-background py-12">
33
- <div className="container mx-auto px-4">
34
- <div className="flex flex-col items-center gap-6 sm:flex-row sm:justify-between">
35
- <footer.Field name="title">
36
- {(content) => <div className="text-foreground text-lg font-bold">{content}</div>}
37
- </footer.Field>
38
-
39
- <div className="flex flex-wrap items-center gap-4">
40
- <footer.Repeater name="links">
41
- {(linkItem) => (
42
- <linkItem.Link name="link">
43
- {({ text, href, newTab }) => (
44
- <Link
45
- to={href}
46
- target={newTab ? "_blank" : undefined}
47
- rel={newTab ? "noreferrer" : undefined}
48
- className="text-muted-foreground hover:text-foreground text-sm transition-colors"
49
- >
50
- {text}
51
- </Link>
52
- )}
53
- </linkItem.Link>
54
- )}
55
- </footer.Repeater>
56
- </div>
57
- </div>
58
-
59
- <div className="text-muted-foreground mt-8 text-center text-sm">
60
- &copy; {new Date().getFullYear()} All rights reserved.
61
- </div>
62
- </div>
63
- </footer>
64
- );
65
- }
66
-
67
- export { footer as block };
@@ -1,64 +0,0 @@
1
- import { Link } from "@tanstack/react-router";
2
- import { Type, createBlock } from "camox/createBlock";
3
-
4
- import { Button } from "@/components/ui/button";
5
-
6
- const hero = createBlock({
7
- id: "hero",
8
- title: "Hero",
9
- description:
10
- "Use this block as the main landing section at the top of a page. It should capture attention immediately with a clear value proposition.",
11
- toMarkdown: ["# {{title}}", "{{description}}", "{{cta}}"],
12
- content: {
13
- title: Type.String({
14
- default: "Welcome to {{projectName}}",
15
- title: "Title",
16
- }),
17
- description: Type.String({
18
- default: "Build something amazing with Camox.",
19
- maxLength: 280,
20
- title: "Description",
21
- }),
22
- cta: Type.Link({
23
- default: { text: "Get Started", href: "/", newTab: false },
24
- title: "CTA",
25
- }),
26
- },
27
- component: HeroComponent,
28
- });
29
-
30
- function HeroComponent() {
31
- return (
32
- <section className="flex flex-col items-center justify-center py-32">
33
- <div className="container mx-auto px-4">
34
- <div className="mx-auto max-w-3xl text-center">
35
- <hero.Field name="title">
36
- {(content) => (
37
- <h1 className="text-foreground mb-6 text-5xl font-bold tracking-tight sm:text-6xl">
38
- {content}
39
- </h1>
40
- )}
41
- </hero.Field>
42
- <hero.Field name="description">
43
- {(content) => <p className="text-muted-foreground mb-10 text-xl">{content}</p>}
44
- </hero.Field>
45
- <hero.Link name="cta">
46
- {({ text, href, newTab }) => (
47
- <Button size="lg" asChild>
48
- <Link
49
- to={href}
50
- target={newTab ? "_blank" : undefined}
51
- rel={newTab ? "noreferrer" : undefined}
52
- >
53
- {text}
54
- </Link>
55
- </Button>
56
- )}
57
- </hero.Link>
58
- </div>
59
- </div>
60
- </section>
61
- );
62
- }
63
-
64
- export { hero as block };
@@ -1,95 +0,0 @@
1
- import { Link } from "@tanstack/react-router";
2
- import { Type, createBlock } from "camox/createBlock";
3
-
4
- import { Button } from "@/components/ui/button";
5
-
6
- const navbar = createBlock({
7
- id: "navbar",
8
- title: "Navbar",
9
- layoutOnly: true,
10
- description:
11
- "A navigation bar at the top of a page with a brand name, navigation links, and a call-to-action link.",
12
- toMarkdown: ["{{title}}", "{{links}}", "{{cta}}"],
13
- content: {
14
- title: Type.Link({
15
- title: "Site name",
16
- default: {
17
- href: "/",
18
- text: "{{projectName}}",
19
- newTab: false,
20
- },
21
- }),
22
- links: Type.RepeatableObject(
23
- {
24
- link: Type.Link({
25
- default: { text: "Link", href: "#", newTab: false },
26
- title: "Link",
27
- }),
28
- },
29
- {
30
- minItems: 1,
31
- maxItems: 6,
32
- title: "Links",
33
- toMarkdown: ["{{link}}"],
34
- },
35
- ),
36
- cta: Type.Link({
37
- default: { text: "Get Started", href: "#", newTab: false },
38
- title: "CTA",
39
- }),
40
- },
41
- component: NavbarComponent,
42
- });
43
-
44
- function NavbarComponent() {
45
- return (
46
- <nav className="dark bg-background border-border border-b">
47
- <div className="container mx-auto px-4">
48
- <div className="flex h-16 items-center justify-between">
49
- <navbar.Link name="title">
50
- {(link) => (
51
- <Link className="text-foreground text-xl font-bold" to={link.href}>
52
- {link.text}
53
- </Link>
54
- )}
55
- </navbar.Link>
56
-
57
- <div className="flex items-center gap-6">
58
- <navbar.Repeater name="links">
59
- {(linkItem) => (
60
- <linkItem.Link name="link">
61
- {({ text, href, newTab }) => (
62
- <Link
63
- to={href}
64
- target={newTab ? "_blank" : undefined}
65
- rel={newTab ? "noreferrer" : undefined}
66
- className="text-muted-foreground hover:text-foreground text-sm transition-colors"
67
- >
68
- {text}
69
- </Link>
70
- )}
71
- </linkItem.Link>
72
- )}
73
- </navbar.Repeater>
74
-
75
- <navbar.Link name="cta">
76
- {({ text, href, newTab }) => (
77
- <Button size="sm" asChild>
78
- <Link
79
- to={href}
80
- target={newTab ? "_blank" : undefined}
81
- rel={newTab ? "noreferrer" : undefined}
82
- >
83
- {text}
84
- </Link>
85
- </Button>
86
- )}
87
- </navbar.Link>
88
- </div>
89
- </div>
90
- </div>
91
- </nav>
92
- );
93
- }
94
-
95
- export { navbar as block };
@@ -1,99 +0,0 @@
1
- import { Type, createBlock } from "camox/createBlock";
2
-
3
- const statistics = createBlock({
4
- id: "statistics",
5
- title: "Statistics",
6
- description:
7
- "Showcase key metrics, achievements, or performance indicators. Ideal for displaying platform statistics or company milestones.",
8
- toMarkdown: ["## {{subtitle}}", "{{description}}", "{{statistics}}"],
9
- content: {
10
- title: Type.String({
11
- default: "By the numbers",
12
- maxLength: 30,
13
- title: "Title",
14
- }),
15
- subtitle: Type.String({
16
- default: "Trusted by teams worldwide",
17
- title: "Subtitle",
18
- }),
19
- description: Type.String({
20
- default:
21
- "Our platform empowers teams to build and ship faster. Here are some numbers we're proud of.",
22
- title: "Description",
23
- }),
24
- statistics: Type.RepeatableObject(
25
- {
26
- number: Type.String({
27
- default: "100+",
28
- maxLength: 7,
29
- title: "Number",
30
- }),
31
- label: Type.String({
32
- default: "projects launched",
33
- title: "Label",
34
- }),
35
- },
36
- {
37
- minItems: 3,
38
- maxItems: 8,
39
- title: "Statistics",
40
- toMarkdown: ["**{{number}}** — {{label}}"],
41
- },
42
- ),
43
- },
44
- component: StatisticsComponent,
45
- });
46
-
47
- function StatisticsComponent() {
48
- return (
49
- <section className="dark bg-background py-24">
50
- <div className="container mx-auto px-4">
51
- <div className="mx-auto max-w-6xl">
52
- <div className="mb-16">
53
- <statistics.Field name="title">
54
- {(content) => (
55
- <div className="text-primary mb-4 text-sm font-semibold tracking-wider uppercase">
56
- {content}
57
- </div>
58
- )}
59
- </statistics.Field>
60
- <statistics.Field name="subtitle">
61
- {(content) => (
62
- <h2 className="text-foreground mb-6 text-4xl font-bold sm:text-5xl">{content}</h2>
63
- )}
64
- </statistics.Field>
65
- <statistics.Field name="description">
66
- {(content) => (
67
- <p className="text-muted-foreground max-w-3xl text-lg leading-relaxed">{content}</p>
68
- )}
69
- </statistics.Field>
70
- </div>
71
-
72
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-4">
73
- <statistics.Repeater name="statistics">
74
- {(stat) => (
75
- <div className="flex gap-3">
76
- <div className="w-0.5 bg-linear-to-b from-teal-400 to-blue-500" />
77
- <div className="flex flex-col">
78
- <stat.Field name="number">
79
- {(content) => (
80
- <div className="text-foreground mb-2 text-4xl font-bold">{content}</div>
81
- )}
82
- </stat.Field>
83
- <stat.Field name="label">
84
- {(content) => (
85
- <p className="text-muted-foreground text-sm leading-relaxed">{content}</p>
86
- )}
87
- </stat.Field>
88
- </div>
89
- </div>
90
- )}
91
- </statistics.Repeater>
92
- </div>
93
- </div>
94
- </div>
95
- </section>
96
- );
97
- }
98
-
99
- export { statistics as block };
@@ -1,56 +0,0 @@
1
- import { Type, createBlock } from "camox/createBlock";
2
-
3
- const testimonial = createBlock({
4
- id: "testimonial",
5
- title: "Testimonial",
6
- description:
7
- "Display a customer testimonial or user review. Ideal for building trust and social proof.",
8
- toMarkdown: ["> {{quote}}", "— {{author}}, {{title}}, {{company}}"],
9
- content: {
10
- quote: Type.String({
11
- default:
12
- "This platform has transformed how we build and manage our website. The developer experience is exceptional.",
13
- title: "Quote",
14
- }),
15
- author: Type.String({ default: "Sarah Chen", title: "Author" }),
16
- title: Type.String({ default: "Senior Developer", title: "Title" }),
17
- company: Type.String({ default: "TechCorp", title: "Company" }),
18
- },
19
- component: TestimonialComponent,
20
- });
21
-
22
- function TestimonialComponent() {
23
- return (
24
- <section className="bg-background py-24">
25
- <div className="container mx-auto px-4">
26
- <div className="mx-auto max-w-4xl text-center">
27
- <testimonial.Field name="quote">
28
- {(content) => (
29
- <blockquote className="text-foreground mb-8 text-2xl leading-relaxed font-medium sm:text-3xl">
30
- "{content}"
31
- </blockquote>
32
- )}
33
- </testimonial.Field>
34
- <div className="flex flex-col items-center">
35
- <testimonial.Field name="author">
36
- {(content) => (
37
- <cite className="text-foreground text-lg font-semibold not-italic">{content}</cite>
38
- )}
39
- </testimonial.Field>
40
- <div className="text-muted-foreground flex flex-col sm:flex-row sm:items-center sm:gap-2">
41
- <testimonial.Field name="title">
42
- {(content) => <span>{content}</span>}
43
- </testimonial.Field>
44
- <span className="hidden sm:inline">&bull;</span>
45
- <testimonial.Field name="company">
46
- {(content) => <span>{content}</span>}
47
- </testimonial.Field>
48
- </div>
49
- </div>
50
- </div>
51
- </div>
52
- </section>
53
- );
54
- }
55
-
56
- export { testimonial as block };
@@ -1,82 +0,0 @@
1
- import { createLayout } from "camox/createLayout";
2
-
3
- import { block as footerBlock } from "../blocks/footer";
4
- import { block as navbarBlock } from "../blocks/navbar";
5
-
6
- const defaultLayout = createLayout({
7
- id: "default",
8
- title: "Default",
9
- description: "Default page layout with a navbar and footer",
10
- blocks: { before: [navbarBlock], after: [footerBlock] },
11
- component: DefaultLayout,
12
- buildMetaTitle: ({ pageMetaTitle, projectName }) => `${pageMetaTitle} | ${projectName}`,
13
- buildOgImage: ({ title, description, projectName }) => (
14
- <div
15
- style={{
16
- display: "flex",
17
- flexDirection: "column",
18
- justifyContent: "center",
19
- alignItems: "flex-start",
20
- width: "100%",
21
- height: "100%",
22
- backgroundColor: "#09090b",
23
- padding: "60px 80px",
24
- fontFamily: "sans-serif",
25
- }}
26
- >
27
- {projectName && (
28
- <div
29
- style={{
30
- fontSize: 24,
31
- color: "#a1a1aa",
32
- marginBottom: 24,
33
- textTransform: "uppercase",
34
- letterSpacing: "0.1em",
35
- }}
36
- >
37
- {projectName}
38
- </div>
39
- )}
40
- <div
41
- style={{
42
- fontSize: 64,
43
- fontWeight: 700,
44
- color: "#fafafa",
45
- lineHeight: 1.2,
46
- marginBottom: 24,
47
- maxWidth: "100%",
48
- overflow: "hidden",
49
- textOverflow: "ellipsis",
50
- }}
51
- >
52
- {title}
53
- </div>
54
- {description && (
55
- <div
56
- style={{
57
- fontSize: 28,
58
- color: "#a1a1aa",
59
- lineHeight: 1.5,
60
- maxWidth: "80%",
61
- overflow: "hidden",
62
- textOverflow: "ellipsis",
63
- }}
64
- >
65
- {description}
66
- </div>
67
- )}
68
- </div>
69
- ),
70
- });
71
-
72
- function DefaultLayout({ children }: { children: React.ReactNode }) {
73
- return (
74
- <main className="flex min-h-screen flex-col">
75
- <defaultLayout.blocks.Navbar />
76
- <div className="flex-1">{children}</div>
77
- <defaultLayout.blocks.Footer />
78
- </main>
79
- );
80
- }
81
-
82
- export { defaultLayout as layout };
@@ -1,57 +0,0 @@
1
- import { Slot } from "@radix-ui/react-slot";
2
- import type { VariantProps } from "class-variance-authority";
3
- import { cva } from "class-variance-authority";
4
- import * as React from "react";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- const buttonVariants = cva(
9
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
10
- {
11
- variants: {
12
- variant: {
13
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
14
- destructive:
15
- "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
16
- outline:
17
- "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
18
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
19
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
20
- link: "text-primary underline-offset-4 hover:underline",
21
- },
22
- size: {
23
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
24
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
25
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
26
- icon: "size-9",
27
- },
28
- },
29
- defaultVariants: {
30
- variant: "default",
31
- size: "default",
32
- },
33
- },
34
- );
35
-
36
- function Button({
37
- className,
38
- variant,
39
- size,
40
- asChild = false,
41
- ...props
42
- }: React.ComponentProps<"button"> &
43
- VariantProps<typeof buttonVariants> & {
44
- asChild?: boolean;
45
- }) {
46
- const Comp = asChild ? Slot : "button";
47
-
48
- return (
49
- <Comp
50
- data-slot="button"
51
- className={cn(buttonVariants({ variant, size, className }))}
52
- {...props}
53
- />
54
- );
55
- }
56
-
57
- export { Button, buttonVariants };
@@ -1,7 +0,0 @@
1
- import type { ClassValue } from "clsx";
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
-
5
- export function cn(...inputs: Array<ClassValue>) {
6
- return twMerge(clsx(inputs));
7
- }
@@ -1,18 +0,0 @@
1
- import { createRouter as createTanstackRouter } from "@tanstack/react-router";
2
-
3
- import { routeTree } from "./routeTree.gen";
4
-
5
- export function getRouter() {
6
- const router = createTanstackRouter({
7
- routeTree,
8
- defaultPreload: "intent",
9
- });
10
-
11
- return router;
12
- }
13
-
14
- declare module "@tanstack/react-router" {
15
- interface Register {
16
- router: ReturnType<typeof getRouter>;
17
- }
18
- }
@@ -1,48 +0,0 @@
1
- import { HeadContent, Scripts, createRootRoute } from "@tanstack/react-router";
2
-
3
- import siteCss from "../styles.css?url";
4
-
5
- export const Route = createRootRoute({
6
- head: () => {
7
- return {
8
- meta: [
9
- {
10
- charSet: "utf-8",
11
- },
12
- {
13
- name: "viewport",
14
- content: "width=device-width, initial-scale=1",
15
- },
16
- {
17
- title: "{{projectName}}",
18
- },
19
- ],
20
- links: [
21
- {
22
- rel: "stylesheet",
23
- href: siteCss,
24
- },
25
- {
26
- rel: "icon",
27
- href: "/favicon.ico",
28
- },
29
- ],
30
- };
31
- },
32
-
33
- shellComponent: RootDocument,
34
- });
35
-
36
- function RootDocument({ children }: { children: React.ReactNode }) {
37
- return (
38
- <html lang="en">
39
- <head>
40
- <HeadContent />
41
- </head>
42
- <body>
43
- {children}
44
- <Scripts />
45
- </body>
46
- </html>
47
- );
48
- }
@@ -1,132 +0,0 @@
1
- @import "tailwindcss";
2
- @import "tw-animate-css";
3
-
4
- @custom-variant dark (&:is(.dark *));
5
-
6
- body {
7
- @apply m-0;
8
- font-family:
9
- -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
10
- "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
11
- -webkit-font-smoothing: antialiased;
12
- -moz-osx-font-smoothing: grayscale;
13
- }
14
-
15
- :root {
16
- --background: oklch(1 0 0);
17
- --foreground: oklch(0.13 0.028 261.692);
18
- --card: oklch(1 0 0);
19
- --card-foreground: oklch(0.13 0.028 261.692);
20
- --popover: oklch(1 0 0);
21
- --popover-foreground: oklch(0.13 0.028 261.692);
22
- --primary: oklch(0.21 0.034 264.665);
23
- --primary-foreground: oklch(0.985 0.002 247.839);
24
- --secondary: oklch(0.967 0.003 264.542);
25
- --secondary-foreground: oklch(0.21 0.034 264.665);
26
- --muted: oklch(0.967 0.003 264.542);
27
- --muted-foreground: oklch(0.551 0.027 264.364);
28
- --accent: oklch(0.967 0.003 264.542);
29
- --accent-foreground: oklch(0.21 0.034 264.665);
30
- --destructive: oklch(0.577 0.245 27.325);
31
- --destructive-foreground: oklch(0.577 0.245 27.325);
32
- --border: oklch(0.928 0.006 264.531);
33
- --input: oklch(0.928 0.006 264.531);
34
- --ring: oklch(0.707 0.022 261.325);
35
- --chart-1: oklch(0.646 0.222 41.116);
36
- --chart-2: oklch(0.6 0.118 184.704);
37
- --chart-3: oklch(0.398 0.07 227.392);
38
- --chart-4: oklch(0.828 0.189 84.429);
39
- --chart-5: oklch(0.769 0.188 70.08);
40
- --radius: 0.4rem;
41
- --sidebar: oklch(0.985 0.002 247.839);
42
- --sidebar-foreground: oklch(0.13 0.028 261.692);
43
- --sidebar-primary: oklch(0.21 0.034 264.665);
44
- --sidebar-primary-foreground: oklch(0.985 0.002 247.839);
45
- --sidebar-accent: oklch(0.967 0.003 264.542);
46
- --sidebar-accent-foreground: oklch(0.21 0.034 264.665);
47
- --sidebar-border: oklch(0.928 0.006 264.531);
48
- --sidebar-ring: oklch(0.707 0.022 261.325);
49
- }
50
-
51
- .dark {
52
- --background: oklch(0.13 0.028 261.692);
53
- --foreground: oklch(0.985 0.002 247.839);
54
- --card: oklch(0.21 0.034 264.665);
55
- --card-foreground: oklch(0.985 0.002 247.839);
56
- --popover: oklch(0.21 0.034 264.665);
57
- --popover-foreground: oklch(0.985 0.002 247.839);
58
- --primary: oklch(0.928 0.006 264.531);
59
- --primary-foreground: oklch(0.21 0.034 264.665);
60
- --secondary: oklch(0.278 0.033 256.848);
61
- --secondary-foreground: oklch(0.985 0.002 247.839);
62
- --muted: oklch(0.278 0.033 256.848);
63
- --muted-foreground: oklch(0.707 0.022 261.325);
64
- --accent: oklch(0.278 0.033 256.848);
65
- --accent-foreground: oklch(0.985 0.002 247.839);
66
- --destructive: oklch(0.704 0.191 22.216);
67
- --destructive-foreground: oklch(0.637 0.237 25.331);
68
- --border: oklch(1 0 0 / 10%);
69
- --input: oklch(1 0 0 / 15%);
70
- --ring: oklch(0.551 0.027 264.364);
71
- --chart-1: oklch(0.488 0.243 264.376);
72
- --chart-2: oklch(0.696 0.17 162.48);
73
- --chart-3: oklch(0.769 0.188 70.08);
74
- --chart-4: oklch(0.627 0.265 303.9);
75
- --chart-5: oklch(0.645 0.246 16.439);
76
- --sidebar: oklch(0.21 0.034 264.665);
77
- --sidebar-foreground: oklch(0.985 0.002 247.839);
78
- --sidebar-primary: oklch(0.488 0.243 264.376);
79
- --sidebar-primary-foreground: oklch(0.985 0.002 247.839);
80
- --sidebar-accent: oklch(0.278 0.033 256.848);
81
- --sidebar-accent-foreground: oklch(0.985 0.002 247.839);
82
- --sidebar-border: oklch(1 0 0 / 10%);
83
- --sidebar-ring: oklch(0.551 0.027 264.364);
84
- }
85
-
86
- @theme inline {
87
- --color-background: var(--background);
88
- --color-foreground: var(--foreground);
89
- --color-card: var(--card);
90
- --color-card-foreground: var(--card-foreground);
91
- --color-popover: var(--popover);
92
- --color-popover-foreground: var(--popover-foreground);
93
- --color-primary: var(--primary);
94
- --color-primary-foreground: var(--primary-foreground);
95
- --color-secondary: var(--secondary);
96
- --color-secondary-foreground: var(--secondary-foreground);
97
- --color-muted: var(--muted);
98
- --color-muted-foreground: var(--muted-foreground);
99
- --color-accent: var(--accent);
100
- --color-accent-foreground: var(--accent-foreground);
101
- --color-destructive: var(--destructive);
102
- --color-destructive-foreground: var(--destructive-foreground);
103
- --color-border: var(--border);
104
- --color-input: var(--input);
105
- --color-ring: var(--ring);
106
- --color-chart-1: var(--chart-1);
107
- --color-chart-2: var(--chart-2);
108
- --color-chart-3: var(--chart-3);
109
- --color-chart-4: var(--chart-4);
110
- --color-chart-5: var(--chart-5);
111
- --radius-sm: calc(var(--radius) - 4px);
112
- --radius-md: calc(var(--radius) - 2px);
113
- --radius-lg: var(--radius);
114
- --radius-xl: calc(var(--radius) + 4px);
115
- --color-sidebar: var(--sidebar);
116
- --color-sidebar-foreground: var(--sidebar-foreground);
117
- --color-sidebar-primary: var(--sidebar-primary);
118
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
119
- --color-sidebar-accent: var(--sidebar-accent);
120
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
121
- --color-sidebar-border: var(--sidebar-border);
122
- --color-sidebar-ring: var(--sidebar-ring);
123
- }
124
-
125
- @layer base {
126
- * {
127
- @apply border-border outline-ring/50;
128
- }
129
- body {
130
- @apply bg-background text-foreground;
131
- }
132
- }
@@ -1,25 +0,0 @@
1
- {
2
- "include": ["./**/*.ts", "./**/*.tsx"],
3
- "exclude": ["node_modules", "dist"],
4
- "compilerOptions": {
5
- "target": "ES2022",
6
- "jsx": "react-jsx",
7
- "module": "ESNext",
8
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
9
- "types": ["vite/client"],
10
- "moduleResolution": "bundler",
11
- "allowImportingTsExtensions": true,
12
- "verbatimModuleSyntax": false,
13
- "noEmit": true,
14
- "allowJs": true,
15
- "skipLibCheck": true,
16
- "strict": true,
17
- "noUnusedLocals": true,
18
- "noUnusedParameters": true,
19
- "noFallthroughCasesInSwitch": true,
20
- "noUncheckedSideEffectImports": true,
21
- "paths": {
22
- "@/*": ["./src/*"]
23
- }
24
- }
25
- }
@@ -1,10 +0,0 @@
1
- import tailwindcss from "@tailwindcss/vite";
2
- import { tanstackStart } from "@tanstack/react-start/plugin/vite";
3
- import viteReact from "@vitejs/plugin-react";
4
- import { camox } from "camox/vite";
5
- import { defineConfig } from "vite";
6
-
7
- export default defineConfig({
8
- resolve: { tsconfigPaths: true },
9
- plugins: [tailwindcss(), camox({ projectSlug: "{{projectSlug}}" }), tanstackStart(), viteReact()],
10
- });