create-patties 0.0.11 → 0.0.12
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/CHANGELOG.md +30 -0
- package/package.json +4 -2
- package/src/index.ts +345 -167
- package/src/prompts.ts +62 -17
- package/src/readme.ts +12 -5
- package/src/ui.ts +93 -0
- package/templates/_backend/app/routes/api/todos.ts +30 -0
- package/templates/_claude/.claude/commands/patties-init.md +33 -0
- package/templates/_claude/.claude/skills/patties/SKILL.md +104 -0
- package/templates/_codex/.codex/rules/patties-patterns.md +105 -0
- package/templates/_codex/AGENTS.md +1 -0
- package/templates/_container/.dockerignore +7 -0
- package/templates/_container/Dockerfile +27 -0
- package/templates/_monorepo/packages/README.md +18 -0
- package/templates/_shared/patties-patterns.md +105 -0
- package/templates/default/README-template.md +85 -71
- package/templates/default/app/routes/api/health.ts +8 -0
- package/templates/ui-starter/_internal/cn.ts +6 -0
- package/templates/ui-starter/_internal/slot.ts +50 -0
- package/templates/ui-starter/_internal/variants.ts +1 -0
- package/templates/ui-starter/button.tsx +60 -0
- package/templates/ui-starter/card.tsx +92 -0
- package/templates/ui-starter/demo/TodoApp.tsx +86 -0
- package/templates/ui-starter/demo/index.tsx +41 -0
- package/templates/ui-starter/input.tsx +20 -0
- package/templates/ui-starter/label.tsx +18 -0
- package/templates/ui-starter/themes/neutral/tokens.css +46 -0
- package/templates/ui-starter/themes/slate/tokens.css +46 -0
- package/templates/ui-starter/themes/stone/tokens.css +46 -0
- package/templates/ui-starter/themes/zinc/tokens.css +46 -0
- package/templates/ui-starter/tokens.css +46 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { cn } from "./_internal/cn.ts";
|
|
3
|
+
|
|
4
|
+
export const island = true as const;
|
|
5
|
+
|
|
6
|
+
export function Input({ className, type, ...props }: ComponentProps<"input">) {
|
|
7
|
+
return (
|
|
8
|
+
<input
|
|
9
|
+
type={type}
|
|
10
|
+
data-slot="input"
|
|
11
|
+
className={cn(
|
|
12
|
+
"flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
13
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
14
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20",
|
|
15
|
+
className,
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Root } from "@radix-ui/react-label";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
import { cn } from "./_internal/cn.ts";
|
|
4
|
+
|
|
5
|
+
export const island = false as const;
|
|
6
|
+
|
|
7
|
+
export function Label({ className, ...props }: ComponentProps<typeof Root>) {
|
|
8
|
+
return (
|
|
9
|
+
<Root
|
|
10
|
+
data-slot="label"
|
|
11
|
+
className={cn(
|
|
12
|
+
"flex select-none items-center gap-2 font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* @patties:tokens base */
|
|
2
|
+
:root {
|
|
3
|
+
--background: oklch(1 0 0);
|
|
4
|
+
--foreground: oklch(0.145 0 0);
|
|
5
|
+
--card: oklch(1 0 0);
|
|
6
|
+
--card-foreground: oklch(0.145 0 0);
|
|
7
|
+
--popover: oklch(1 0 0);
|
|
8
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
9
|
+
--primary: oklch(0.205 0 0);
|
|
10
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
11
|
+
--secondary: oklch(0.97 0 0);
|
|
12
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
13
|
+
--muted: oklch(0.97 0 0);
|
|
14
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
15
|
+
--accent: oklch(0.97 0 0);
|
|
16
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
17
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
18
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
19
|
+
--border: oklch(0.922 0 0);
|
|
20
|
+
--input: oklch(0.922 0 0);
|
|
21
|
+
--ring: oklch(0.708 0 0);
|
|
22
|
+
--radius: 0.625rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dark {
|
|
26
|
+
--background: oklch(0.145 0 0);
|
|
27
|
+
--foreground: oklch(0.985 0 0);
|
|
28
|
+
--card: oklch(0.205 0 0);
|
|
29
|
+
--card-foreground: oklch(0.985 0 0);
|
|
30
|
+
--popover: oklch(0.205 0 0);
|
|
31
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
32
|
+
--primary: oklch(0.985 0 0);
|
|
33
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
34
|
+
--secondary: oklch(0.269 0 0);
|
|
35
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
36
|
+
--muted: oklch(0.269 0 0);
|
|
37
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
38
|
+
--accent: oklch(0.269 0 0);
|
|
39
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
40
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
41
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
42
|
+
--border: oklch(0.269 0 0);
|
|
43
|
+
--input: oklch(0.269 0 0);
|
|
44
|
+
--ring: oklch(0.556 0 0);
|
|
45
|
+
}
|
|
46
|
+
/* @patties:end base */
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* @patties:tokens base */
|
|
2
|
+
:root {
|
|
3
|
+
--background: oklch(1 0 0);
|
|
4
|
+
--foreground: oklch(0.129 0.042 264.695);
|
|
5
|
+
--card: oklch(1 0 0);
|
|
6
|
+
--card-foreground: oklch(0.129 0.042 264.695);
|
|
7
|
+
--popover: oklch(1 0 0);
|
|
8
|
+
--popover-foreground: oklch(0.129 0.042 264.695);
|
|
9
|
+
--primary: oklch(0.208 0.042 265.755);
|
|
10
|
+
--primary-foreground: oklch(0.984 0.003 247.858);
|
|
11
|
+
--secondary: oklch(0.968 0.007 247.896);
|
|
12
|
+
--secondary-foreground: oklch(0.208 0.042 265.755);
|
|
13
|
+
--muted: oklch(0.968 0.007 247.896);
|
|
14
|
+
--muted-foreground: oklch(0.554 0.046 257.417);
|
|
15
|
+
--accent: oklch(0.968 0.007 247.896);
|
|
16
|
+
--accent-foreground: oklch(0.208 0.042 265.755);
|
|
17
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
18
|
+
--destructive-foreground: oklch(0.984 0.003 247.858);
|
|
19
|
+
--border: oklch(0.929 0.013 255.508);
|
|
20
|
+
--input: oklch(0.929 0.013 255.508);
|
|
21
|
+
--ring: oklch(0.704 0.04 256.788);
|
|
22
|
+
--radius: 0.625rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dark {
|
|
26
|
+
--background: oklch(0.129 0.042 264.695);
|
|
27
|
+
--foreground: oklch(0.984 0.003 247.858);
|
|
28
|
+
--card: oklch(0.208 0.042 265.755);
|
|
29
|
+
--card-foreground: oklch(0.984 0.003 247.858);
|
|
30
|
+
--popover: oklch(0.208 0.042 265.755);
|
|
31
|
+
--popover-foreground: oklch(0.984 0.003 247.858);
|
|
32
|
+
--primary: oklch(0.929 0.013 255.508);
|
|
33
|
+
--primary-foreground: oklch(0.208 0.042 265.755);
|
|
34
|
+
--secondary: oklch(0.279 0.041 260.031);
|
|
35
|
+
--secondary-foreground: oklch(0.984 0.003 247.858);
|
|
36
|
+
--muted: oklch(0.279 0.041 260.031);
|
|
37
|
+
--muted-foreground: oklch(0.704 0.04 256.788);
|
|
38
|
+
--accent: oklch(0.279 0.041 260.031);
|
|
39
|
+
--accent-foreground: oklch(0.984 0.003 247.858);
|
|
40
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
41
|
+
--destructive-foreground: oklch(0.984 0.003 247.858);
|
|
42
|
+
--border: oklch(0.279 0.041 260.031);
|
|
43
|
+
--input: oklch(0.279 0.041 260.031);
|
|
44
|
+
--ring: oklch(0.551 0.027 264.364);
|
|
45
|
+
}
|
|
46
|
+
/* @patties:end base */
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* @patties:tokens base */
|
|
2
|
+
:root {
|
|
3
|
+
--background: oklch(1 0 0);
|
|
4
|
+
--foreground: oklch(0.147 0.004 49.25);
|
|
5
|
+
--card: oklch(1 0 0);
|
|
6
|
+
--card-foreground: oklch(0.147 0.004 49.25);
|
|
7
|
+
--popover: oklch(1 0 0);
|
|
8
|
+
--popover-foreground: oklch(0.147 0.004 49.25);
|
|
9
|
+
--primary: oklch(0.216 0.006 56.043);
|
|
10
|
+
--primary-foreground: oklch(0.985 0.001 106.423);
|
|
11
|
+
--secondary: oklch(0.97 0.001 106.424);
|
|
12
|
+
--secondary-foreground: oklch(0.216 0.006 56.043);
|
|
13
|
+
--muted: oklch(0.97 0.001 106.424);
|
|
14
|
+
--muted-foreground: oklch(0.553 0.013 58.071);
|
|
15
|
+
--accent: oklch(0.97 0.001 106.424);
|
|
16
|
+
--accent-foreground: oklch(0.216 0.006 56.043);
|
|
17
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
18
|
+
--destructive-foreground: oklch(0.985 0.001 106.423);
|
|
19
|
+
--border: oklch(0.923 0.003 48.717);
|
|
20
|
+
--input: oklch(0.923 0.003 48.717);
|
|
21
|
+
--ring: oklch(0.709 0.01 56.259);
|
|
22
|
+
--radius: 0.625rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dark {
|
|
26
|
+
--background: oklch(0.147 0.004 49.25);
|
|
27
|
+
--foreground: oklch(0.985 0.001 106.423);
|
|
28
|
+
--card: oklch(0.216 0.006 56.043);
|
|
29
|
+
--card-foreground: oklch(0.985 0.001 106.423);
|
|
30
|
+
--popover: oklch(0.216 0.006 56.043);
|
|
31
|
+
--popover-foreground: oklch(0.985 0.001 106.423);
|
|
32
|
+
--primary: oklch(0.923 0.003 48.717);
|
|
33
|
+
--primary-foreground: oklch(0.216 0.006 56.043);
|
|
34
|
+
--secondary: oklch(0.268 0.007 34.298);
|
|
35
|
+
--secondary-foreground: oklch(0.985 0.001 106.423);
|
|
36
|
+
--muted: oklch(0.268 0.007 34.298);
|
|
37
|
+
--muted-foreground: oklch(0.709 0.01 56.259);
|
|
38
|
+
--accent: oklch(0.268 0.007 34.298);
|
|
39
|
+
--accent-foreground: oklch(0.985 0.001 106.423);
|
|
40
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
41
|
+
--destructive-foreground: oklch(0.985 0.001 106.423);
|
|
42
|
+
--border: oklch(0.268 0.007 34.298);
|
|
43
|
+
--input: oklch(0.268 0.007 34.298);
|
|
44
|
+
--ring: oklch(0.553 0.013 58.071);
|
|
45
|
+
}
|
|
46
|
+
/* @patties:end base */
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* @patties:tokens base */
|
|
2
|
+
:root {
|
|
3
|
+
--background: oklch(1 0 0);
|
|
4
|
+
--foreground: oklch(0.141 0.005 285.823);
|
|
5
|
+
--card: oklch(1 0 0);
|
|
6
|
+
--card-foreground: oklch(0.141 0.005 285.823);
|
|
7
|
+
--popover: oklch(1 0 0);
|
|
8
|
+
--popover-foreground: oklch(0.141 0.005 285.823);
|
|
9
|
+
--primary: oklch(0.21 0.006 285.885);
|
|
10
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
11
|
+
--secondary: oklch(0.967 0.001 286.375);
|
|
12
|
+
--secondary-foreground: oklch(0.21 0.006 285.885);
|
|
13
|
+
--muted: oklch(0.967 0.001 286.375);
|
|
14
|
+
--muted-foreground: oklch(0.552 0.016 285.938);
|
|
15
|
+
--accent: oklch(0.967 0.001 286.375);
|
|
16
|
+
--accent-foreground: oklch(0.21 0.006 285.885);
|
|
17
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
18
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
19
|
+
--border: oklch(0.92 0.004 286.32);
|
|
20
|
+
--input: oklch(0.92 0.004 286.32);
|
|
21
|
+
--ring: oklch(0.705 0.015 286.067);
|
|
22
|
+
--radius: 0.625rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dark {
|
|
26
|
+
--background: oklch(0.141 0.005 285.823);
|
|
27
|
+
--foreground: oklch(0.985 0 0);
|
|
28
|
+
--card: oklch(0.21 0.006 285.885);
|
|
29
|
+
--card-foreground: oklch(0.985 0 0);
|
|
30
|
+
--popover: oklch(0.21 0.006 285.885);
|
|
31
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
32
|
+
--primary: oklch(0.92 0.004 286.32);
|
|
33
|
+
--primary-foreground: oklch(0.21 0.006 285.885);
|
|
34
|
+
--secondary: oklch(0.274 0.006 286.033);
|
|
35
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
36
|
+
--muted: oklch(0.274 0.006 286.033);
|
|
37
|
+
--muted-foreground: oklch(0.705 0.015 286.067);
|
|
38
|
+
--accent: oklch(0.274 0.006 286.033);
|
|
39
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
40
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
41
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
42
|
+
--border: oklch(0.274 0.006 286.033);
|
|
43
|
+
--input: oklch(0.274 0.006 286.033);
|
|
44
|
+
--ring: oklch(0.552 0.016 285.938);
|
|
45
|
+
}
|
|
46
|
+
/* @patties:end base */
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* @patties:tokens base */
|
|
2
|
+
:root {
|
|
3
|
+
--background: oklch(1 0 0);
|
|
4
|
+
--foreground: oklch(0.145 0 0);
|
|
5
|
+
--card: oklch(1 0 0);
|
|
6
|
+
--card-foreground: oklch(0.145 0 0);
|
|
7
|
+
--popover: oklch(1 0 0);
|
|
8
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
9
|
+
--primary: oklch(0.205 0 0);
|
|
10
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
11
|
+
--secondary: oklch(0.97 0 0);
|
|
12
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
13
|
+
--muted: oklch(0.97 0 0);
|
|
14
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
15
|
+
--accent: oklch(0.97 0 0);
|
|
16
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
17
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
18
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
19
|
+
--border: oklch(0.922 0 0);
|
|
20
|
+
--input: oklch(0.922 0 0);
|
|
21
|
+
--ring: oklch(0.708 0 0);
|
|
22
|
+
--radius: 0.625rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dark {
|
|
26
|
+
--background: oklch(0.145 0 0);
|
|
27
|
+
--foreground: oklch(0.985 0 0);
|
|
28
|
+
--card: oklch(0.205 0 0);
|
|
29
|
+
--card-foreground: oklch(0.985 0 0);
|
|
30
|
+
--popover: oklch(0.205 0 0);
|
|
31
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
32
|
+
--primary: oklch(0.985 0 0);
|
|
33
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
34
|
+
--secondary: oklch(0.269 0 0);
|
|
35
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
36
|
+
--muted: oklch(0.269 0 0);
|
|
37
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
38
|
+
--accent: oklch(0.269 0 0);
|
|
39
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
40
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
41
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
42
|
+
--border: oklch(0.269 0 0);
|
|
43
|
+
--input: oklch(0.269 0 0);
|
|
44
|
+
--ring: oklch(0.556 0 0);
|
|
45
|
+
}
|
|
46
|
+
/* @patties:end base */
|