create-lumen 2.0.0-alpha.0 → 2.0.0-alpha.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 +35 -12
- package/bin/cli.js +1 -0
- package/package.json +3 -2
- package/schema/fixtures/v2/invalid/architecture-preset-type-mismatch.json +35 -0
- package/schema/fixtures/v2/invalid/harness-empty-commands.json +37 -0
- package/schema/fixtures/v2/invalid/harness-missing-command.json +41 -0
- package/schema/fixtures/v2/invalid/invalid-validation-mode.json +34 -0
- package/schema/fixtures/v2/invalid/shadcn-without-tailwind.json +1 -1
- package/schema/fixtures/v2/valid/harness-full.json +44 -0
- package/schema/fixtures/v2/valid/react-vite-type-based.json +1 -1
- package/schema/fixtures/v2/valid/validation-none.json +41 -0
- package/schema/fixtures/v2/valid/validation-relaxed.json +41 -0
- package/schema/lumen.config.v2.json +54 -2
- package/skills/create-lumen/SKILL.md +110 -0
- package/skills/create-lumen/references/manifest-v2.md +9 -0
- package/src/agent-context.js +114 -0
- package/src/cli-args.js +65 -3
- package/src/configure.js +4 -0
- package/src/css.js +14 -30
- package/src/dependencies.js +28 -18
- package/src/engine/capabilities.js +174 -4
- package/src/engine/composition.js +644 -0
- package/src/engine/index.js +1 -0
- package/src/injector.js +294 -446
- package/src/main.js +20 -7
- package/src/manifest/emit.js +49 -3
- package/src/manifest/schema.js +65 -7
- package/src/prompts.js +459 -247
- package/src/readme.js +23 -2
- package/src/scaffold.js +17 -0
- package/templates/architectures/hybrid/main.jsx +10 -0
- package/templates/architectures/hybrid/main.tsx +10 -0
- package/templates/architectures/hybrid/src/App.jsx +20 -0
- package/templates/architectures/hybrid/src/App.tsx +20 -0
- package/templates/architectures/hybrid/src/shared/components/ui/Button.jsx +31 -0
- package/templates/architectures/hybrid/src/shared/components/ui/Button.tsx +36 -0
- package/templates/architectures/hybrid/src/shared/components/ui/index.js +1 -0
- package/templates/architectures/hybrid/src/shared/components/ui/index.ts +1 -0
- package/templates/architectures/hybrid/src/shared/hooks/useLocalStorage.jsx +28 -0
- package/templates/architectures/hybrid/src/shared/hooks/useLocalStorage.ts +28 -0
- package/templates/architectures/hybrid/src/shared/layouts/.gitkeep +0 -0
- package/templates/architectures/hybrid/src/shared/stores/.gitkeep +0 -0
- package/templates/architectures/hybrid/src/shared/styles/.gitkeep +0 -0
- package/templates/architectures/hybrid/src/shared/types/index.js +20 -0
- package/templates/architectures/hybrid/src/shared/types/index.ts +16 -0
- package/templates/architectures/hybrid/src/shared/utils/cn.jsx +3 -0
- package/templates/architectures/hybrid/src/shared/utils/cn.ts +5 -0
- package/templates/architectures/none/main.jsx +10 -0
- package/templates/architectures/none/main.tsx +10 -0
- package/templates/architectures/none/src/App.jsx +15 -0
- package/templates/architectures/none/src/App.tsx +15 -0
- package/templates/architectures/none/src/styles/.gitkeep +1 -0
- package/templates/architectures/none/src/types/index.js +20 -0
- package/templates/architectures/none/src/types/index.ts +16 -0
- package/templates/conditional/testing/jest/hybrid/src/__tests__/App.test.jsx +11 -0
- package/templates/conditional/testing/jest/hybrid/src/__tests__/App.test.tsx +11 -0
- package/templates/conditional/testing/jest/none/src/__tests__/App.test.jsx +11 -0
- package/templates/conditional/testing/jest/none/src/__tests__/App.test.tsx +11 -0
- package/templates/conditional/testing/vitest/hybrid/src/__tests__/App.test.jsx +10 -0
- package/templates/conditional/testing/vitest/hybrid/src/__tests__/App.test.tsx +10 -0
- package/templates/conditional/testing/vitest/none/src/__tests__/App.test.jsx +10 -0
- package/templates/conditional/testing/vitest/none/src/__tests__/App.test.tsx +10 -0
- package/templates/css/tailwind/src/globals.css +10 -0
- package/templates/css/tailwind/src/themes.css +86 -4
- package/templates/ui/shadcn/lib/utils.js +6 -0
- package/templates/ui/shadcn/lib/utils.ts +6 -0
- package/templates/ui/shadcn/primitives/Button.jsx +48 -0
- package/templates/ui/shadcn/primitives/Button.tsx +59 -0
- package/templates/ui/shadcn/primitives/Card.jsx +55 -0
- package/templates/ui/shadcn/primitives/Card.tsx +73 -0
- package/templates/ui/shadcn/primitives/index.js +9 -0
- package/templates/ui/shadcn/primitives/index.ts +9 -0
- package/templates/css/bootstrap/src/themes.css +0 -14
- /package/templates/{css/bootstrap/src/globals.css → architectures/hybrid/src/features/.gitkeep} +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
|
|
4
|
+
const buttonVariants = ({
|
|
5
|
+
variant = "default",
|
|
6
|
+
size = "default",
|
|
7
|
+
className = "",
|
|
8
|
+
} = {}) => {
|
|
9
|
+
const base =
|
|
10
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
|
|
11
|
+
|
|
12
|
+
const variants = {
|
|
13
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
14
|
+
destructive:
|
|
15
|
+
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
16
|
+
outline:
|
|
17
|
+
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
18
|
+
secondary:
|
|
19
|
+
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
20
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
21
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const sizes = {
|
|
25
|
+
default: "h-9 px-4 py-2",
|
|
26
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
27
|
+
lg: "h-10 rounded-md px-8",
|
|
28
|
+
icon: "h-9 w-9",
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return cn(base, variants[variant] || variants.default, sizes[size] || sizes.default, className);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const Button = React.forwardRef(
|
|
35
|
+
({ className, variant = "default", size = "default", ...props }, ref) => {
|
|
36
|
+
return (
|
|
37
|
+
<button
|
|
38
|
+
className={buttonVariants({ variant, size, className })}
|
|
39
|
+
ref={ref}
|
|
40
|
+
{...props}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
Button.displayName = "Button";
|
|
46
|
+
|
|
47
|
+
// eslint-disable-next-line react-refresh/only-export-components
|
|
48
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
|
|
4
|
+
export interface ButtonProps
|
|
5
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
7
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const buttonVariants = ({
|
|
12
|
+
variant = "default",
|
|
13
|
+
size = "default",
|
|
14
|
+
className = "",
|
|
15
|
+
}: {
|
|
16
|
+
variant?: ButtonProps["variant"];
|
|
17
|
+
size?: ButtonProps["size"];
|
|
18
|
+
className?: string;
|
|
19
|
+
} = {}) => {
|
|
20
|
+
const base =
|
|
21
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
|
|
22
|
+
|
|
23
|
+
const variants = {
|
|
24
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
25
|
+
destructive:
|
|
26
|
+
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
27
|
+
outline:
|
|
28
|
+
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
29
|
+
secondary:
|
|
30
|
+
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
31
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
32
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const sizes = {
|
|
36
|
+
default: "h-9 px-4 py-2",
|
|
37
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
38
|
+
lg: "h-10 rounded-md px-8",
|
|
39
|
+
icon: "h-9 w-9",
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return cn(base, variants[variant] || variants.default, sizes[size] || sizes.default, className);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
46
|
+
({ className, variant = "default", size = "default", ...props }, ref) => {
|
|
47
|
+
return (
|
|
48
|
+
<button
|
|
49
|
+
className={buttonVariants({ variant, size, className })}
|
|
50
|
+
ref={ref}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
Button.displayName = "Button";
|
|
57
|
+
|
|
58
|
+
// eslint-disable-next-line react-refresh/only-export-components
|
|
59
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
|
|
4
|
+
export const Card = React.forwardRef(({ className, ...props }, ref) => (
|
|
5
|
+
<div
|
|
6
|
+
ref={ref}
|
|
7
|
+
className={cn(
|
|
8
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
9
|
+
className
|
|
10
|
+
)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
));
|
|
14
|
+
Card.displayName = "Card";
|
|
15
|
+
|
|
16
|
+
export const CardHeader = React.forwardRef(({ className, ...props }, ref) => (
|
|
17
|
+
<div
|
|
18
|
+
ref={ref}
|
|
19
|
+
className={cn("flex flex-col space-y-1.5 p-6", className)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
));
|
|
23
|
+
CardHeader.displayName = "CardHeader";
|
|
24
|
+
|
|
25
|
+
export const CardTitle = React.forwardRef(({ className, ...props }, ref) => (
|
|
26
|
+
<div
|
|
27
|
+
ref={ref}
|
|
28
|
+
className={cn("font-semibold leading-none tracking-tight", className)}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
));
|
|
32
|
+
CardTitle.displayName = "CardTitle";
|
|
33
|
+
|
|
34
|
+
export const CardDescription = React.forwardRef(({ className, ...props }, ref) => (
|
|
35
|
+
<div
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
));
|
|
41
|
+
CardDescription.displayName = "CardDescription";
|
|
42
|
+
|
|
43
|
+
export const CardContent = React.forwardRef(({ className, ...props }, ref) => (
|
|
44
|
+
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
|
45
|
+
));
|
|
46
|
+
CardContent.displayName = "CardContent";
|
|
47
|
+
|
|
48
|
+
export const CardFooter = React.forwardRef(({ className, ...props }, ref) => (
|
|
49
|
+
<div
|
|
50
|
+
ref={ref}
|
|
51
|
+
className={cn("flex items-center p-6 pt-0", className)}
|
|
52
|
+
{...props}
|
|
53
|
+
/>
|
|
54
|
+
));
|
|
55
|
+
CardFooter.displayName = "CardFooter";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
|
|
4
|
+
export const Card = React.forwardRef<
|
|
5
|
+
HTMLDivElement,
|
|
6
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
7
|
+
>(({ className, ...props }, ref) => (
|
|
8
|
+
<div
|
|
9
|
+
ref={ref}
|
|
10
|
+
className={cn(
|
|
11
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
));
|
|
17
|
+
Card.displayName = "Card";
|
|
18
|
+
|
|
19
|
+
export const CardHeader = React.forwardRef<
|
|
20
|
+
HTMLDivElement,
|
|
21
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
22
|
+
>(({ className, ...props }, ref) => (
|
|
23
|
+
<div
|
|
24
|
+
ref={ref}
|
|
25
|
+
className={cn("flex flex-col space-y-1.5 p-6", className)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
));
|
|
29
|
+
CardHeader.displayName = "CardHeader";
|
|
30
|
+
|
|
31
|
+
export const CardTitle = React.forwardRef<
|
|
32
|
+
HTMLDivElement,
|
|
33
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
34
|
+
>(({ className, ...props }, ref) => (
|
|
35
|
+
<div
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={cn("font-semibold leading-none tracking-tight", className)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
));
|
|
41
|
+
CardTitle.displayName = "CardTitle";
|
|
42
|
+
|
|
43
|
+
export const CardDescription = React.forwardRef<
|
|
44
|
+
HTMLDivElement,
|
|
45
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
46
|
+
>(({ className, ...props }, ref) => (
|
|
47
|
+
<div
|
|
48
|
+
ref={ref}
|
|
49
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
));
|
|
53
|
+
CardDescription.displayName = "CardDescription";
|
|
54
|
+
|
|
55
|
+
export const CardContent = React.forwardRef<
|
|
56
|
+
HTMLDivElement,
|
|
57
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
58
|
+
>(({ className, ...props }, ref) => (
|
|
59
|
+
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
|
60
|
+
));
|
|
61
|
+
CardContent.displayName = "CardContent";
|
|
62
|
+
|
|
63
|
+
export const CardFooter = React.forwardRef<
|
|
64
|
+
HTMLDivElement,
|
|
65
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
66
|
+
>(({ className, ...props }, ref) => (
|
|
67
|
+
<div
|
|
68
|
+
ref={ref}
|
|
69
|
+
className={cn("flex items-center p-6 pt-0", className)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
));
|
|
73
|
+
CardFooter.displayName = "CardFooter";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* themes.css — Bootstrap 5.3+ theme overrides
|
|
2
|
-
* Bootstrap 5.3+ reads data-bs-theme on a parent element to switch between
|
|
3
|
-
* light/dark variants. The themes here customize the default tokens; the
|
|
4
|
-
* data-bs-theme attribute is applied externally.
|
|
5
|
-
*/
|
|
6
|
-
:root[data-bs-theme="light"] {
|
|
7
|
-
--bs-primary: #6366f1;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
:root[data-bs-theme="dark"] {
|
|
11
|
-
--bs-body-bg: #111827;
|
|
12
|
-
--bs-body-color: #f9fafb;
|
|
13
|
-
--bs-primary: #818cf8;
|
|
14
|
-
}
|
/package/templates/{css/bootstrap/src/globals.css → architectures/hybrid/src/features/.gitkeep}
RENAMED
|
File without changes
|