diff --git a/bun.lockb b/bun.lockb deleted file mode 100644 index 9a60ffc..0000000 Binary files a/bun.lockb and /dev/null differ diff --git a/.eslintrc.json b/image-ai/.eslintrc.json similarity index 100% rename from .eslintrc.json rename to image-ai/.eslintrc.json diff --git a/.gitignore b/image-ai/.gitignore similarity index 100% rename from .gitignore rename to image-ai/.gitignore diff --git a/README.md b/image-ai/README.md similarity index 100% rename from README.md rename to image-ai/README.md diff --git a/image-ai/bun.lockb b/image-ai/bun.lockb new file mode 100644 index 0000000..774dfa2 Binary files /dev/null and b/image-ai/bun.lockb differ diff --git a/image-ai/components.json b/image-ai/components.json new file mode 100644 index 0000000..2009941 --- /dev/null +++ b/image-ai/components.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "default", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "tailwind.config.ts", + "css": "src/app/globals.css", + "baseColor": "slate", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + } +} \ No newline at end of file diff --git a/next.config.ts b/image-ai/next.config.ts similarity index 100% rename from next.config.ts rename to image-ai/next.config.ts diff --git a/package.json b/image-ai/package.json similarity index 70% rename from package.json rename to image-ai/package.json index 809381b..8b53677 100644 --- a/package.json +++ b/image-ai/package.json @@ -9,9 +9,15 @@ "lint": "next lint" }, "dependencies": { + "@radix-ui/react-slot": "^1.1.0", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", + "lucide-react": "^0.453.0", + "next": "15.0.0", "react": "19.0.0-rc-65a56d0e-20241020", "react-dom": "19.0.0-rc-65a56d0e-20241020", - "next": "15.0.0" + "tailwind-merge": "^2.5.4", + "tailwindcss-animate": "^1.0.7" }, "devDependencies": { "typescript": "^5", diff --git a/postcss.config.mjs b/image-ai/postcss.config.mjs similarity index 100% rename from postcss.config.mjs rename to image-ai/postcss.config.mjs diff --git a/public/file.svg b/image-ai/public/file.svg similarity index 100% rename from public/file.svg rename to image-ai/public/file.svg diff --git a/public/globe.svg b/image-ai/public/globe.svg similarity index 100% rename from public/globe.svg rename to image-ai/public/globe.svg diff --git a/public/next.svg b/image-ai/public/next.svg similarity index 100% rename from public/next.svg rename to image-ai/public/next.svg diff --git a/public/vercel.svg b/image-ai/public/vercel.svg similarity index 100% rename from public/vercel.svg rename to image-ai/public/vercel.svg diff --git a/public/window.svg b/image-ai/public/window.svg similarity index 100% rename from public/window.svg rename to image-ai/public/window.svg diff --git a/src/app/favicon.ico b/image-ai/src/app/favicon.ico similarity index 100% rename from src/app/favicon.ico rename to image-ai/src/app/favicon.ico diff --git a/src/app/fonts/GeistMonoVF.woff b/image-ai/src/app/fonts/GeistMonoVF.woff similarity index 100% rename from src/app/fonts/GeistMonoVF.woff rename to image-ai/src/app/fonts/GeistMonoVF.woff diff --git a/src/app/fonts/GeistVF.woff b/image-ai/src/app/fonts/GeistVF.woff similarity index 100% rename from src/app/fonts/GeistVF.woff rename to image-ai/src/app/fonts/GeistVF.woff diff --git a/image-ai/src/app/globals.css b/image-ai/src/app/globals.css new file mode 100644 index 0000000..f102207 --- /dev/null +++ b/image-ai/src/app/globals.css @@ -0,0 +1,72 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +body { + font-family: Arial, Helvetica, sans-serif; +} + +@layer base { + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 210 40% 98%; + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; + --ring: 222.2 84% 4.9%; + --chart-1: 12 76% 61%; + --chart-2: 173 58% 39%; + --chart-3: 197 37% 24%; + --chart-4: 43 74% 66%; + --chart-5: 27 87% 67%; + --radius: 0.5rem; + } + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 11.2%; + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; + --ring: 212.7 26.8% 83.9%; + --chart-1: 220 70% 50%; + --chart-2: 160 60% 45%; + --chart-3: 30 80% 55%; + --chart-4: 280 65% 60%; + --chart-5: 340 75% 55%; + } +} + +@layer base { + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} diff --git a/src/app/layout.tsx b/image-ai/src/app/layout.tsx similarity index 100% rename from src/app/layout.tsx rename to image-ai/src/app/layout.tsx diff --git a/image-ai/src/app/page.tsx b/image-ai/src/app/page.tsx new file mode 100644 index 0000000..ceac1c9 --- /dev/null +++ b/image-ai/src/app/page.tsx @@ -0,0 +1,12 @@ +import { Button } from "@/components/ui/button"; //@ = at, src내부의 경로 + +export default function Home() { + return( +
+ + Hello World! +
+ ); +}; \ No newline at end of file diff --git a/image-ai/src/components/ui/button.tsx b/image-ai/src/components/ui/button.tsx new file mode 100644 index 0000000..36496a2 --- /dev/null +++ b/image-ai/src/components/ui/button.tsx @@ -0,0 +1,56 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const buttonVariants = cva( + "inline-flex items-center justify-center gap-2 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: + "border border-input bg-background hover:bg-accent hover:text-accent-foreground", + secondary: + "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-10 px-4 py-2", + sm: "h-9 rounded-md px-3", + lg: "h-11 rounded-md px-8", + icon: "h-10 w-10", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +export interface ButtonProps + extends React.ButtonHTMLAttributes, + VariantProps { + asChild?: boolean +} + +const Button = React.forwardRef( + ({ className, variant, size, asChild = false, ...props }, ref) => { + const Comp = asChild ? Slot : "button" + return ( + + ) + } +) +Button.displayName = "Button" + +export { Button, buttonVariants } diff --git a/image-ai/src/lib/utils.ts b/image-ai/src/lib/utils.ts new file mode 100644 index 0000000..bd0c391 --- /dev/null +++ b/image-ai/src/lib/utils.ts @@ -0,0 +1,6 @@ +import { clsx, type ClassValue } from "clsx" +import { twMerge } from "tailwind-merge" + +export function cn(...inputs: ClassValue[]) { + return twMerge(clsx(inputs)) +} diff --git a/image-ai/tailwind.config.ts b/image-ai/tailwind.config.ts new file mode 100644 index 0000000..0aecfcc --- /dev/null +++ b/image-ai/tailwind.config.ts @@ -0,0 +1,63 @@ +import type { Config } from "tailwindcss"; + +const config: Config = { + darkMode: ["class"], + content: [ + "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", + "./src/components/**/*.{js,ts,jsx,tsx,mdx}", + "./src/app/**/*.{js,ts,jsx,tsx,mdx}", + ], + theme: { + extend: { + colors: { + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))' + }, + popover: { + DEFAULT: 'hsl(var(--popover))', + foreground: 'hsl(var(--popover-foreground))' + }, + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))' + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))' + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))' + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))' + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))' + }, + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + chart: { + '1': 'hsl(var(--chart-1))', + '2': 'hsl(var(--chart-2))', + '3': 'hsl(var(--chart-3))', + '4': 'hsl(var(--chart-4))', + '5': 'hsl(var(--chart-5))' + } + }, + borderRadius: { + lg: 'var(--radius)', + md: 'calc(var(--radius) - 2px)', + sm: 'calc(var(--radius) - 4px)' + } + } + }, + plugins: [require("tailwindcss-animate")], +}; +export default config; diff --git a/tsconfig.json b/image-ai/tsconfig.json similarity index 100% rename from tsconfig.json rename to image-ai/tsconfig.json diff --git a/src/app/globals.css b/src/app/globals.css deleted file mode 100644 index 9eccd88..0000000 --- a/src/app/globals.css +++ /dev/null @@ -1,29 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - - -html,body{ - height: 100%; - margin: 0; - padding: 0; - -} - -:root { - --background: #ffffff; - --foreground: #171717; -} - -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } -} - -body { - color: var(--foreground); - background: var(--background); - font-family: Arial, Helvetica, sans-serif; -} diff --git a/src/app/page.tsx b/src/app/page.tsx deleted file mode 100644 index d127067..0000000 --- a/src/app/page.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { createElement } from "react"; - -export default function Home() { - - function myfunction() { - return {a:"serlj"} - } - - - return ( - //flex로 레이아웃 반반 나누기 -
-
- hello -
-
- world -
-
- ); - - - -} - - - diff --git a/tailwind.config.ts b/tailwind.config.ts deleted file mode 100644 index 021c393..0000000 --- a/tailwind.config.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Config } from "tailwindcss"; - -const config: Config = { - content: [ - "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", - "./src/components/**/*.{js,ts,jsx,tsx,mdx}", - "./src/app/**/*.{js,ts,jsx,tsx,mdx}", - ], - theme: { - extend: { - colors: { - background: "var(--background)", - foreground: "var(--foreground)", - }, - }, - }, - plugins: [], -}; -export default config;