create-camox 0.1.0-alpha.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/LICENSE.md ADDED
@@ -0,0 +1,110 @@
1
+ # Functional Source License, Version 1.1, MIT Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-MIT
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 Rémi de Juvigny
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the MIT license that is effective on the second anniversary of the date we make
91
+ the Software available. On or after that date, you may use the Software under
92
+ the MIT license, in which case the following will apply:
93
+
94
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
95
+ this software and associated documentation files (the "Software"), to deal in
96
+ the Software without restriction, including without limitation the rights to
97
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
98
+ of the Software, and to permit persons to whom the Software is furnished to do
99
+ so, subject to the following conditions:
100
+
101
+ The above copyright notice and this permission notice shall be included in all
102
+ copies or substantial portions of the Software.
103
+
104
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
105
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
106
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
107
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
108
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
109
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
110
+ SOFTWARE.
package/dist/index.js ADDED
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import fs from "fs";
5
+ import path from "path";
6
+ import { fileURLToPath } from "url";
7
+ import * as p from "@clack/prompts";
8
+ var __dirname = path.dirname(fileURLToPath(import.meta.url));
9
+ function slugify(name) {
10
+ return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
11
+ }
12
+ function copyDir(src, dest, replacements) {
13
+ fs.mkdirSync(dest, { recursive: true });
14
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
15
+ const srcPath = path.join(src, entry.name);
16
+ const destPath = path.join(dest, entry.name);
17
+ if (entry.isDirectory()) {
18
+ copyDir(srcPath, destPath, replacements);
19
+ continue;
20
+ }
21
+ let content = fs.readFileSync(srcPath, "utf-8");
22
+ for (const [key, value] of Object.entries(replacements)) {
23
+ content = content.replaceAll(key, value);
24
+ }
25
+ fs.writeFileSync(destPath, content);
26
+ }
27
+ }
28
+ async function main() {
29
+ p.intro("create-camox");
30
+ const result = await p.group(
31
+ {
32
+ name: () => p.text({
33
+ message: "Project display name",
34
+ placeholder: "My Website",
35
+ validate: (value) => {
36
+ if (!value.trim()) return "Project name is required";
37
+ }
38
+ }),
39
+ slug: ({ results }) => p.text({
40
+ message: "Project slug",
41
+ initialValue: slugify(results.name ?? ""),
42
+ validate: (value) => {
43
+ if (!value.trim()) return "Slug is required";
44
+ if (!/^[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(value) && !/^[a-z0-9]$/.test(value)) {
45
+ return "Slug must be lowercase alphanumeric with hyphens";
46
+ }
47
+ }
48
+ }),
49
+ path: ({ results }) => p.text({
50
+ message: "Project path",
51
+ initialValue: `./${results.slug ?? "my-site"}`,
52
+ validate: (value) => {
53
+ if (!value.trim()) return "Path is required";
54
+ }
55
+ })
56
+ },
57
+ {
58
+ onCancel: () => {
59
+ p.cancel("Cancelled.");
60
+ process.exit(0);
61
+ }
62
+ }
63
+ );
64
+ const targetDir = path.resolve(result.path);
65
+ if (fs.existsSync(targetDir) && fs.readdirSync(targetDir).length > 0) {
66
+ p.cancel(`Directory ${targetDir} is not empty.`);
67
+ process.exit(1);
68
+ }
69
+ const s = p.spinner();
70
+ s.start("Scaffolding project...");
71
+ const templateDir = path.resolve(__dirname, "..", "template");
72
+ copyDir(templateDir, targetDir, {
73
+ "{{projectName}}": result.name,
74
+ "{{projectSlug}}": result.slug
75
+ });
76
+ s.stop("Project scaffolded!");
77
+ p.note([`cd ${result.path}`, "pnpm install", "pnpm dev"].join("\n"), "Next steps");
78
+ p.outro("Happy building!");
79
+ }
80
+ main().catch(console.error);
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "create-camox",
3
+ "version": "0.1.0-alpha.0",
4
+ "bin": {
5
+ "create-camox": "./dist/index.js"
6
+ },
7
+ "files": [
8
+ "dist",
9
+ "template"
10
+ ],
11
+ "type": "module",
12
+ "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"
22
+ }
23
+ }
@@ -0,0 +1,22 @@
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
+ }
@@ -0,0 +1,39 @@
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": "latest",
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
+ }
@@ -0,0 +1,67 @@
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 };
@@ -0,0 +1,64 @@
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 };
@@ -0,0 +1,95 @@
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 };
@@ -0,0 +1,99 @@
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 };
@@ -0,0 +1,56 @@
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 };
@@ -0,0 +1,82 @@
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 };
@@ -0,0 +1,57 @@
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 };
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,132 @@
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
+ }
@@ -0,0 +1,25 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ });