@agentforge-ai/cli 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/default/.env.example +46 -6
  2. package/dist/default/README.md +89 -9
  3. package/dist/default/convex/schema.ts +248 -4
  4. package/dist/default/dashboard/app/components/DashboardLayout.tsx +245 -0
  5. package/dist/default/dashboard/app/components/ui/badge.tsx +26 -0
  6. package/dist/default/dashboard/app/components/ui/button.tsx +41 -0
  7. package/dist/default/dashboard/app/components/ui/card.tsx +44 -0
  8. package/dist/default/dashboard/app/components/ui/dialog.tsx +66 -0
  9. package/dist/default/dashboard/app/components/ui/input.tsx +21 -0
  10. package/dist/default/dashboard/app/components/ui/label.tsx +18 -0
  11. package/dist/default/dashboard/app/components/ui/select.tsx +75 -0
  12. package/dist/default/dashboard/app/components/ui/sheet.tsx +73 -0
  13. package/dist/default/dashboard/app/components/ui/switch.tsx +34 -0
  14. package/dist/default/dashboard/app/components/ui/table.tsx +60 -0
  15. package/dist/default/dashboard/app/components/ui/tabs.tsx +50 -0
  16. package/dist/default/dashboard/app/components/ui/tooltip.tsx +23 -0
  17. package/dist/default/dashboard/app/lib/utils.ts +6 -0
  18. package/dist/default/dashboard/app/main.tsx +35 -0
  19. package/dist/default/dashboard/app/routeTree.gen.ts +352 -0
  20. package/dist/default/dashboard/app/routes/__root.tsx +10 -0
  21. package/dist/default/dashboard/app/routes/agents.tsx +255 -0
  22. package/dist/default/dashboard/app/routes/chat.tsx +427 -0
  23. package/dist/default/dashboard/app/routes/connections.tsx +413 -0
  24. package/dist/default/dashboard/app/routes/cron.tsx +322 -0
  25. package/dist/default/dashboard/app/routes/files.tsx +203 -0
  26. package/dist/default/dashboard/app/routes/index.tsx +141 -0
  27. package/dist/default/dashboard/app/routes/projects.tsx +254 -0
  28. package/dist/default/dashboard/app/routes/sessions.tsx +272 -0
  29. package/dist/default/dashboard/app/routes/settings.tsx +583 -0
  30. package/dist/default/dashboard/app/routes/skills.tsx +252 -0
  31. package/dist/default/dashboard/app/routes/usage.tsx +181 -0
  32. package/dist/default/dashboard/app/styles/globals.css +93 -0
  33. package/dist/default/dashboard/index.html +13 -0
  34. package/dist/default/dashboard/package.json +36 -0
  35. package/dist/default/dashboard/postcss.config.js +6 -0
  36. package/dist/default/dashboard/tailwind.config.js +50 -0
  37. package/dist/default/dashboard/tsconfig.json +24 -0
  38. package/dist/default/dashboard/vite.config.ts +16 -0
  39. package/dist/default/package.json +8 -3
  40. package/dist/default/skills/skill-creator/SKILL.md +270 -0
  41. package/dist/default/skills/skill-creator/config.json +11 -0
  42. package/dist/default/skills/skill-creator/index.ts +392 -0
  43. package/dist/default/src/agent.ts +85 -5
  44. package/dist/index.js +1574 -10
  45. package/dist/index.js.map +1 -1
  46. package/package.json +2 -1
  47. package/templates/default/.env.example +46 -6
  48. package/templates/default/README.md +89 -9
  49. package/templates/default/convex/schema.ts +248 -4
  50. package/templates/default/dashboard/app/components/DashboardLayout.tsx +245 -0
  51. package/templates/default/dashboard/app/components/ui/badge.tsx +26 -0
  52. package/templates/default/dashboard/app/components/ui/button.tsx +41 -0
  53. package/templates/default/dashboard/app/components/ui/card.tsx +44 -0
  54. package/templates/default/dashboard/app/components/ui/dialog.tsx +66 -0
  55. package/templates/default/dashboard/app/components/ui/input.tsx +21 -0
  56. package/templates/default/dashboard/app/components/ui/label.tsx +18 -0
  57. package/templates/default/dashboard/app/components/ui/select.tsx +75 -0
  58. package/templates/default/dashboard/app/components/ui/sheet.tsx +73 -0
  59. package/templates/default/dashboard/app/components/ui/switch.tsx +34 -0
  60. package/templates/default/dashboard/app/components/ui/table.tsx +60 -0
  61. package/templates/default/dashboard/app/components/ui/tabs.tsx +50 -0
  62. package/templates/default/dashboard/app/components/ui/tooltip.tsx +23 -0
  63. package/templates/default/dashboard/app/lib/utils.ts +6 -0
  64. package/templates/default/dashboard/app/main.tsx +35 -0
  65. package/templates/default/dashboard/app/routeTree.gen.ts +352 -0
  66. package/templates/default/dashboard/app/routes/__root.tsx +10 -0
  67. package/templates/default/dashboard/app/routes/agents.tsx +255 -0
  68. package/templates/default/dashboard/app/routes/chat.tsx +427 -0
  69. package/templates/default/dashboard/app/routes/connections.tsx +413 -0
  70. package/templates/default/dashboard/app/routes/cron.tsx +322 -0
  71. package/templates/default/dashboard/app/routes/files.tsx +203 -0
  72. package/templates/default/dashboard/app/routes/index.tsx +141 -0
  73. package/templates/default/dashboard/app/routes/projects.tsx +254 -0
  74. package/templates/default/dashboard/app/routes/sessions.tsx +272 -0
  75. package/templates/default/dashboard/app/routes/settings.tsx +583 -0
  76. package/templates/default/dashboard/app/routes/skills.tsx +252 -0
  77. package/templates/default/dashboard/app/routes/usage.tsx +181 -0
  78. package/templates/default/dashboard/app/styles/globals.css +93 -0
  79. package/templates/default/dashboard/index.html +13 -0
  80. package/templates/default/dashboard/package.json +36 -0
  81. package/templates/default/dashboard/postcss.config.js +6 -0
  82. package/templates/default/dashboard/tailwind.config.js +50 -0
  83. package/templates/default/dashboard/tsconfig.json +24 -0
  84. package/templates/default/dashboard/vite.config.ts +16 -0
  85. package/templates/default/package.json +8 -3
  86. package/templates/default/skills/skill-creator/SKILL.md +270 -0
  87. package/templates/default/skills/skill-creator/config.json +11 -0
  88. package/templates/default/skills/skill-creator/index.ts +392 -0
  89. package/templates/default/src/agent.ts +85 -5
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { cn } from "../../lib/utils";
3
+
4
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ variant?: "default" | "secondary" | "destructive" | "outline";
6
+ }
7
+
8
+ const variants: Record<string, string> = {
9
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
10
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
11
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
12
+ outline: "text-foreground",
13
+ };
14
+
15
+ export function Badge({ className, variant = "default", ...props }: BadgeProps) {
16
+ return (
17
+ <div
18
+ className={cn(
19
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
20
+ variants[variant],
21
+ className
22
+ )}
23
+ {...props}
24
+ />
25
+ );
26
+ }
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import { cn } from "../../lib/utils";
3
+
4
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
6
+ size?: "default" | "sm" | "lg" | "icon";
7
+ }
8
+
9
+ const variants: Record<string, string> = {
10
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
11
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
12
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
13
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
14
+ ghost: "hover:bg-accent hover:text-accent-foreground",
15
+ link: "text-primary underline-offset-4 hover:underline",
16
+ };
17
+
18
+ const sizes: Record<string, string> = {
19
+ default: "h-10 px-4 py-2",
20
+ sm: "h-9 rounded-md px-3",
21
+ lg: "h-11 rounded-md px-8",
22
+ icon: "h-10 w-10",
23
+ };
24
+
25
+ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
26
+ ({ className, variant = "default", size = "default", ...props }, ref) => {
27
+ return (
28
+ <button
29
+ className={cn(
30
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
31
+ variants[variant],
32
+ sizes[size],
33
+ className
34
+ )}
35
+ ref={ref}
36
+ {...props}
37
+ />
38
+ );
39
+ }
40
+ );
41
+ Button.displayName = "Button";
@@ -0,0 +1,44 @@
1
+ import React from "react";
2
+ import { cn } from "../../lib/utils";
3
+
4
+ export const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
5
+ ({ className, ...props }, ref) => (
6
+ <div ref={ref} className={cn("rounded-lg border bg-card text-card-foreground shadow-sm", className)} {...props} />
7
+ )
8
+ );
9
+ Card.displayName = "Card";
10
+
11
+ export const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
12
+ ({ className, ...props }, ref) => (
13
+ <div ref={ref} className={cn("flex flex-col space-y-1.5 p-6", className)} {...props} />
14
+ )
15
+ );
16
+ CardHeader.displayName = "CardHeader";
17
+
18
+ export const CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
19
+ ({ className, ...props }, ref) => (
20
+ <h3 ref={ref} className={cn("text-2xl font-semibold leading-none tracking-tight", className)} {...props} />
21
+ )
22
+ );
23
+ CardTitle.displayName = "CardTitle";
24
+
25
+ export const CardDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
26
+ ({ className, ...props }, ref) => (
27
+ <p ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
28
+ )
29
+ );
30
+ CardDescription.displayName = "CardDescription";
31
+
32
+ export const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
33
+ ({ className, ...props }, ref) => (
34
+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
35
+ )
36
+ );
37
+ CardContent.displayName = "CardContent";
38
+
39
+ export const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
40
+ ({ className, ...props }, ref) => (
41
+ <div ref={ref} className={cn("flex items-center p-6 pt-0", className)} {...props} />
42
+ )
43
+ );
44
+ CardFooter.displayName = "CardFooter";
@@ -0,0 +1,66 @@
1
+ import React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ import { X } from "lucide-react";
4
+ import { cn } from "../../lib/utils";
5
+
6
+ export const Dialog = DialogPrimitive.Root;
7
+ export const DialogTrigger = DialogPrimitive.Trigger;
8
+ export const DialogPortal = DialogPrimitive.Portal;
9
+ export const DialogClose = DialogPrimitive.Close;
10
+
11
+ export const DialogOverlay = React.forwardRef<
12
+ React.ElementRef<typeof DialogPrimitive.Overlay>,
13
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
14
+ >(({ className, ...props }, ref) => (
15
+ <DialogPrimitive.Overlay
16
+ ref={ref}
17
+ className={cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)}
18
+ {...props}
19
+ />
20
+ ));
21
+ DialogOverlay.displayName = "DialogOverlay";
22
+
23
+ export const DialogContent = React.forwardRef<
24
+ React.ElementRef<typeof DialogPrimitive.Content>,
25
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
26
+ >(({ className, children, ...props }, ref) => (
27
+ <DialogPortal>
28
+ <DialogOverlay />
29
+ <DialogPrimitive.Content
30
+ ref={ref}
31
+ className={cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-card p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className)}
32
+ {...props}
33
+ >
34
+ {children}
35
+ <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
36
+ <X className="h-4 w-4" />
37
+ <span className="sr-only">Close</span>
38
+ </DialogPrimitive.Close>
39
+ </DialogPrimitive.Content>
40
+ </DialogPortal>
41
+ ));
42
+ DialogContent.displayName = "DialogContent";
43
+
44
+ export const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
45
+ <div className={cn("flex flex-col space-y-1.5 text-center sm:text-left", className)} {...props} />
46
+ );
47
+
48
+ export const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
49
+ <div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props} />
50
+ );
51
+
52
+ export const DialogTitle = React.forwardRef<
53
+ React.ElementRef<typeof DialogPrimitive.Title>,
54
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
55
+ >(({ className, ...props }, ref) => (
56
+ <DialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold leading-none tracking-tight", className)} {...props} />
57
+ ));
58
+ DialogTitle.displayName = "DialogTitle";
59
+
60
+ export const DialogDescription = React.forwardRef<
61
+ React.ElementRef<typeof DialogPrimitive.Description>,
62
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
63
+ >(({ className, ...props }, ref) => (
64
+ <DialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
65
+ ));
66
+ DialogDescription.displayName = "DialogDescription";
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { cn } from "../../lib/utils";
3
+
4
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
5
+
6
+ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
7
+ ({ className, type, ...props }, ref) => {
8
+ return (
9
+ <input
10
+ type={type}
11
+ className={cn(
12
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
13
+ className
14
+ )}
15
+ ref={ref}
16
+ {...props}
17
+ />
18
+ );
19
+ }
20
+ );
21
+ Input.displayName = "Input";
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { cn } from "../../lib/utils";
3
+
4
+ export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {}
5
+
6
+ export const Label = React.forwardRef<HTMLLabelElement, LabelProps>(
7
+ ({ className, ...props }, ref) => (
8
+ <label
9
+ ref={ref}
10
+ className={cn(
11
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
12
+ className
13
+ )}
14
+ {...props}
15
+ />
16
+ )
17
+ );
18
+ Label.displayName = "Label";
@@ -0,0 +1,75 @@
1
+ import React from "react";
2
+ import * as SelectPrimitive from "@radix-ui/react-select";
3
+ import { Check, ChevronDown, ChevronUp } from "lucide-react";
4
+ import { cn } from "../../lib/utils";
5
+
6
+ export const Select = SelectPrimitive.Root;
7
+ export const SelectGroup = SelectPrimitive.Group;
8
+ export const SelectValue = SelectPrimitive.Value;
9
+
10
+ export const SelectTrigger = React.forwardRef<
11
+ React.ElementRef<typeof SelectPrimitive.Trigger>,
12
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
13
+ >(({ className, children, ...props }, ref) => (
14
+ <SelectPrimitive.Trigger
15
+ ref={ref}
16
+ className={cn(
17
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
18
+ className
19
+ )}
20
+ {...props}
21
+ >
22
+ {children}
23
+ <SelectPrimitive.Icon asChild>
24
+ <ChevronDown className="h-4 w-4 opacity-50" />
25
+ </SelectPrimitive.Icon>
26
+ </SelectPrimitive.Trigger>
27
+ ));
28
+ SelectTrigger.displayName = "SelectTrigger";
29
+
30
+ export const SelectContent = React.forwardRef<
31
+ React.ElementRef<typeof SelectPrimitive.Content>,
32
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
33
+ >(({ className, children, position = "popper", ...props }, ref) => (
34
+ <SelectPrimitive.Portal>
35
+ <SelectPrimitive.Content
36
+ ref={ref}
37
+ className={cn(
38
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
39
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
40
+ className
41
+ )}
42
+ position={position}
43
+ {...props}
44
+ >
45
+ <SelectPrimitive.Viewport
46
+ className={cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")}
47
+ >
48
+ {children}
49
+ </SelectPrimitive.Viewport>
50
+ </SelectPrimitive.Content>
51
+ </SelectPrimitive.Portal>
52
+ ));
53
+ SelectContent.displayName = "SelectContent";
54
+
55
+ export const SelectItem = React.forwardRef<
56
+ React.ElementRef<typeof SelectPrimitive.Item>,
57
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
58
+ >(({ className, children, ...props }, ref) => (
59
+ <SelectPrimitive.Item
60
+ ref={ref}
61
+ className={cn(
62
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
63
+ className
64
+ )}
65
+ {...props}
66
+ >
67
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
68
+ <SelectPrimitive.ItemIndicator>
69
+ <Check className="h-4 w-4" />
70
+ </SelectPrimitive.ItemIndicator>
71
+ </span>
72
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
73
+ </SelectPrimitive.Item>
74
+ ));
75
+ SelectItem.displayName = "SelectItem";
@@ -0,0 +1,73 @@
1
+ import React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ import { X } from "lucide-react";
4
+ import { cn } from "../../lib/utils";
5
+
6
+ export const Sheet = DialogPrimitive.Root;
7
+ export const SheetTrigger = DialogPrimitive.Trigger;
8
+ export const SheetClose = DialogPrimitive.Close;
9
+ export const SheetPortal = DialogPrimitive.Portal;
10
+
11
+ export const SheetOverlay = React.forwardRef<
12
+ React.ElementRef<typeof DialogPrimitive.Overlay>,
13
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
14
+ >(({ className, ...props }, ref) => (
15
+ <DialogPrimitive.Overlay
16
+ className={cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)}
17
+ {...props}
18
+ ref={ref}
19
+ />
20
+ ));
21
+ SheetOverlay.displayName = "SheetOverlay";
22
+
23
+ export const SheetContent = React.forwardRef<
24
+ React.ElementRef<typeof DialogPrimitive.Content>,
25
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & { side?: "top" | "bottom" | "left" | "right" }
26
+ >(({ side = "right", className, children, ...props }, ref) => (
27
+ <SheetPortal>
28
+ <SheetOverlay />
29
+ <DialogPrimitive.Content
30
+ ref={ref}
31
+ className={cn(
32
+ "fixed z-50 gap-4 bg-card p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
33
+ side === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
34
+ side === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
35
+ side === "top" && "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
36
+ side === "bottom" && "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
37
+ className
38
+ )}
39
+ {...props}
40
+ >
41
+ {children}
42
+ <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
43
+ <X className="h-4 w-4" />
44
+ <span className="sr-only">Close</span>
45
+ </DialogPrimitive.Close>
46
+ </DialogPrimitive.Content>
47
+ </SheetPortal>
48
+ ));
49
+ SheetContent.displayName = "SheetContent";
50
+
51
+ export const SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
52
+ <div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
53
+ );
54
+
55
+ export const SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
56
+ <div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props} />
57
+ );
58
+
59
+ export const SheetTitle = React.forwardRef<
60
+ React.ElementRef<typeof DialogPrimitive.Title>,
61
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
62
+ >(({ className, ...props }, ref) => (
63
+ <DialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold text-foreground", className)} {...props} />
64
+ ));
65
+ SheetTitle.displayName = "SheetTitle";
66
+
67
+ export const SheetDescription = React.forwardRef<
68
+ React.ElementRef<typeof DialogPrimitive.Description>,
69
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
70
+ >(({ className, ...props }, ref) => (
71
+ <DialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
72
+ ));
73
+ SheetDescription.displayName = "SheetDescription";
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+ import { cn } from "../../lib/utils";
3
+
4
+ export interface SwitchProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ checked?: boolean;
6
+ onCheckedChange?: (checked: boolean) => void;
7
+ }
8
+
9
+ export const Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(
10
+ ({ className, checked = false, onCheckedChange, ...props }, ref) => {
11
+ return (
12
+ <button
13
+ ref={ref}
14
+ role="switch"
15
+ aria-checked={checked}
16
+ onClick={() => onCheckedChange?.(!checked)}
17
+ className={cn(
18
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
19
+ checked ? "bg-primary" : "bg-input",
20
+ className
21
+ )}
22
+ {...props}
23
+ >
24
+ <span
25
+ className={cn(
26
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
27
+ checked ? "translate-x-5" : "translate-x-0"
28
+ )}
29
+ />
30
+ </button>
31
+ );
32
+ }
33
+ );
34
+ Switch.displayName = "Switch";
@@ -0,0 +1,60 @@
1
+ import React from "react";
2
+ import { cn } from "../../lib/utils";
3
+
4
+ export const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(
5
+ ({ className, ...props }, ref) => (
6
+ <div className="relative w-full overflow-auto">
7
+ <table ref={ref} className={cn("w-full caption-bottom text-sm", className)} {...props} />
8
+ </div>
9
+ )
10
+ );
11
+ Table.displayName = "Table";
12
+
13
+ export const TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
14
+ ({ className, ...props }, ref) => (
15
+ <thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
16
+ )
17
+ );
18
+ TableHeader.displayName = "TableHeader";
19
+
20
+ export const TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
21
+ ({ className, ...props }, ref) => (
22
+ <tbody ref={ref} className={cn("[&_tr:last-child]:border-0", className)} {...props} />
23
+ )
24
+ );
25
+ TableBody.displayName = "TableBody";
26
+
27
+ export const TableFooter = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
28
+ ({ className, ...props }, ref) => (
29
+ <tfoot ref={ref} className={cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)} {...props} />
30
+ )
31
+ );
32
+ TableFooter.displayName = "TableFooter";
33
+
34
+ export const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(
35
+ ({ className, ...props }, ref) => (
36
+ <tr ref={ref} className={cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className)} {...props} />
37
+ )
38
+ );
39
+ TableRow.displayName = "TableRow";
40
+
41
+ export const TableHead = React.forwardRef<HTMLTableCellElement, React.ThHTMLAttributes<HTMLTableCellElement>>(
42
+ ({ className, ...props }, ref) => (
43
+ <th ref={ref} className={cn("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", className)} {...props} />
44
+ )
45
+ );
46
+ TableHead.displayName = "TableHead";
47
+
48
+ export const TableCell = React.forwardRef<HTMLTableCellElement, React.TdHTMLAttributes<HTMLTableCellElement>>(
49
+ ({ className, ...props }, ref) => (
50
+ <td ref={ref} className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)} {...props} />
51
+ )
52
+ );
53
+ TableCell.displayName = "TableCell";
54
+
55
+ export const TableCaption = React.forwardRef<HTMLTableCaptionElement, React.HTMLAttributes<HTMLTableCaptionElement>>(
56
+ ({ className, ...props }, ref) => (
57
+ <caption ref={ref} className={cn("mt-4 text-sm text-muted-foreground", className)} {...props} />
58
+ )
59
+ );
60
+ TableCaption.displayName = "TableCaption";
@@ -0,0 +1,50 @@
1
+ import React from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ import { cn } from "../../lib/utils";
4
+
5
+ export const Tabs = TabsPrimitive.Root;
6
+
7
+ export const TabsList = React.forwardRef<
8
+ React.ElementRef<typeof TabsPrimitive.List>,
9
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
10
+ >(({ className, ...props }, ref) => (
11
+ <TabsPrimitive.List
12
+ ref={ref}
13
+ className={cn(
14
+ "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
15
+ className
16
+ )}
17
+ {...props}
18
+ />
19
+ ));
20
+ TabsList.displayName = "TabsList";
21
+
22
+ export const TabsTrigger = React.forwardRef<
23
+ React.ElementRef<typeof TabsPrimitive.Trigger>,
24
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
25
+ >(({ className, ...props }, ref) => (
26
+ <TabsPrimitive.Trigger
27
+ ref={ref}
28
+ className={cn(
29
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
30
+ className
31
+ )}
32
+ {...props}
33
+ />
34
+ ));
35
+ TabsTrigger.displayName = "TabsTrigger";
36
+
37
+ export const TabsContent = React.forwardRef<
38
+ React.ElementRef<typeof TabsPrimitive.Content>,
39
+ React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
40
+ >(({ className, ...props }, ref) => (
41
+ <TabsPrimitive.Content
42
+ ref={ref}
43
+ className={cn(
44
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
45
+ className
46
+ )}
47
+ {...props}
48
+ />
49
+ ));
50
+ TabsContent.displayName = "TabsContent";
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
+ import { cn } from "../../lib/utils";
4
+
5
+ export const TooltipProvider = TooltipPrimitive.Provider;
6
+ export const Tooltip = TooltipPrimitive.Root;
7
+ export const TooltipTrigger = TooltipPrimitive.Trigger;
8
+
9
+ export const TooltipContent = React.forwardRef<
10
+ React.ElementRef<typeof TooltipPrimitive.Content>,
11
+ React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
12
+ >(({ className, sideOffset = 4, ...props }, ref) => (
13
+ <TooltipPrimitive.Content
14
+ ref={ref}
15
+ sideOffset={sideOffset}
16
+ className={cn(
17
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
18
+ className
19
+ )}
20
+ {...props}
21
+ />
22
+ ));
23
+ TooltipContent.displayName = "TooltipContent";
@@ -0,0 +1,6 @@
1
+ import { type ClassValue, clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs));
6
+ }
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ import ReactDOM from "react-dom/client";
3
+ import { RouterProvider, createRouter } from "@tanstack/react-router";
4
+ import { ConvexProvider, ConvexReactClient } from "convex/react";
5
+ import { routeTree } from "./routeTree.gen";
6
+ import "./styles/globals.css";
7
+
8
+ // Create router
9
+ const router = createRouter({ routeTree });
10
+
11
+ // Type safety
12
+ declare module "@tanstack/react-router" {
13
+ interface Register {
14
+ router: typeof router;
15
+ }
16
+ }
17
+
18
+ // Initialize Convex client
19
+ const convexUrl =
20
+ (import.meta as any).env?.VITE_CONVEX_URL ||
21
+ "https://hip-cardinal-943.convex.cloud";
22
+ const convex = new ConvexReactClient(convexUrl);
23
+
24
+ // Render
25
+ const rootElement = document.getElementById("root")!;
26
+ if (!rootElement.innerHTML) {
27
+ const root = ReactDOM.createRoot(rootElement);
28
+ root.render(
29
+ <React.StrictMode>
30
+ <ConvexProvider client={convex}>
31
+ <RouterProvider router={router} />
32
+ </ConvexProvider>
33
+ </React.StrictMode>
34
+ );
35
+ }