init project + layout

This commit is contained in:
Ishaan Dey 2024-04-06 19:03:04 -04:00
parent 775c425971
commit f32d84d2c2
13 changed files with 1363 additions and 290 deletions

View File

@ -1,33 +1,76 @@
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
:root { @layer base {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;
}
@media (prefers-color-scheme: dark) {
:root { :root {
--foreground-rgb: 255, 255, 255; --background: 0 0% 100%;
--background-start-rgb: 0, 0, 0; --foreground: 0 0% 3.9%;
--background-end-rgb: 0, 0, 0;
--card: 0 0% 100%;
--card-foreground: 0 0% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 0 0% 3.9%;
--primary: 0 0% 9%;
--primary-foreground: 0 0% 98%;
--secondary: 0 0% 96.1%;
--secondary-foreground: 0 0% 9%;
--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;
--accent: 0 0% 96.1%;
--accent-foreground: 0 0% 9%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 89.8%;
--input: 0 0% 89.8%;
--ring: 0 0% 3.9%;
--radius: 0.5rem;
}
.dark {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
--card: 0 0% 3.9%;
--card-foreground: 0 0% 98%;
--popover: 0 0% 3.9%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 98%;
--primary-foreground: 0 0% 9%;
--secondary: 0 0% 14.9%;
--secondary-foreground: 0 0% 98%;
--muted: 0 0% 14.9%;
--muted-foreground: 0 0% 63.9%;
--accent: 0 0% 14.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 14.9%;
--input: 0 0% 14.9%;
--ring: 0 0% 83.1%;
} }
} }
body { @layer base {
color: rgb(var(--foreground-rgb)); * {
background: linear-gradient( @apply border-border;
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
}
@layer utilities {
.text-balance {
text-wrap: balance;
} }
} body {
@apply bg-background text-foreground;
}
}

View File

@ -1,22 +1,32 @@
import type { Metadata } from "next"; import type { Metadata } from "next"
import { Inter } from "next/font/google"; import { Inter } from "next/font/google"
import "./globals.css"; import "./globals.css"
import { ThemeProvider } from "@/components/layout/themeProvider"
const inter = Inter({ subsets: ["latin"] }); const inter = Inter({ subsets: ["latin"] })
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Create Next App", title: "Create Next App",
description: "Generated by create next app", description: "Generated by create next app",
}; }
export default function RootLayout({ export default function RootLayout({
children, children,
}: Readonly<{ }: Readonly<{
children: React.ReactNode; children: React.ReactNode
}>) { }>) {
return ( return (
<html lang="en"> <html lang="en">
<body className={inter.className}>{children}</body> <body className={inter.className}>
<ThemeProvider
attribute="class"
defaultTheme="dark"
forcedTheme="dark"
disableTransitionOnChange
>
{children}
</ThemeProvider>
</body>
</html> </html>
); )
} }

View File

@ -1,113 +1,17 @@
import Image from "next/image"; import dynamic from "next/dynamic"
import Image from "next/image"
const CodeEditor = dynamic(() => import("@/components/editor"), {
ssr: false,
})
export default function Home() { export default function Home() {
return ( return (
<main className="flex min-h-screen flex-col items-center justify-between p-24"> <div className="w-screen flex flex-col h-screen bg-background">
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex"> <div className="h-12 flex">NAVBAR</div>
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30"> <div className="w-screen flex grow">
Get started by editing&nbsp; <CodeEditor />
<code className="font-mono font-bold">app/page.tsx</code>
</p>
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
<a
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
By{" "}
<Image
src="/vercel.svg"
alt="Vercel Logo"
className="dark:invert"
width={100}
height={24}
priority
/>
</a>
</div>
</div> </div>
</div>
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-full sm:before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full sm:after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]"> )
<Image
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
src="/next.svg"
alt="Next.js Logo"
width={180}
height={37}
priority
/>
</div>
<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Docs{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Find in-depth information about Next.js features and API.
</p>
</a>
<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Learn{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Learn about Next.js in an interactive course with&nbsp;quizzes!
</p>
</a>
<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Templates{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
Explore starter templates for Next.js.
</p>
</a>
<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
target="_blank"
rel="noopener noreferrer"
>
<h2 className={`mb-3 text-2xl font-semibold`}>
Deploy{" "}
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
-&gt;
</span>
</h2>
<p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}>
Instantly deploy your Next.js site to a shareable URL with Vercel.
</p>
</a>
</div>
</main>
);
} }

17
components.json Normal file
View File

@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "app/globals.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}

133
components/editor/index.tsx Normal file
View File

@ -0,0 +1,133 @@
"use client"
import Editor, { OnMount } from "@monaco-editor/react"
import monaco from "monaco-editor"
import { useRef, useState } from "react"
import theme from "./theme.json"
import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
} from "@/components/ui/resizable"
import { Button } from "../ui/button"
import { X } from "lucide-react"
export default function CodeEditor() {
const editorRef = useRef<null | monaco.editor.IStandaloneCodeEditor>(null)
const [code, setCode] = useState([
{
language: "css",
name: "style.css",
value: `body { background-color: #282c34; color: white; }`,
},
{
language: "html",
name: "index.html",
value: `<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Hello, world!</h1>
<script src="script.js"></script>
</body>
</html>`,
},
{
language: "javascript",
name: "script.js",
value: `console.log("Hello, world!")`,
},
])
const handleEditorMount: OnMount = (editor, monaco) => {
editorRef.current = editor
// import("monaco-themes/themes/Blackboard.json").then((data) => {
// monaco.editor.defineTheme(
// "Blackboard",
// data as monaco.editor.IStandaloneThemeData
// )
// })
// monaco.editor.setTheme("Blackboard")
}
return (
<>
<div className="h-full w-52"></div>
<ResizablePanelGroup direction="horizontal">
<ResizablePanel
className="p-2 flex flex-col"
maxSize={75}
minSize={30}
defaultSize={60}
>
<div className="h-10 w-full flex gap-2">
<Button
size="sm"
className="min-w-20 justify-between"
variant="secondary"
>
index.html <X className="w-3 h-3" />
</Button>
<Button
size="sm"
className="min-w-20 justify-between"
variant="secondary"
>
style.css <X className="w-3 h-3" />
</Button>
</div>
<div className="grow w-full overflow-hidden rounded-lg">
<Editor
height="100%"
defaultLanguage="typescript"
onMount={handleEditorMount}
theme="vs-dark"
/>
</div>
</ResizablePanel>
<ResizableHandle />
<ResizablePanel defaultSize={40}>
<ResizablePanelGroup direction="vertical">
<ResizablePanel
defaultSize={50}
minSize={20}
className="p-2 flex flex-col"
>
<div className="h-10 w-full flex gap-2">
<Button
size="sm"
className="min-w-20 justify-between"
variant="secondary"
>
localhost:3000 <X className="w-3 h-3" />
</Button>
</div>
<div className="w-full grow rounded-lg bg-foreground"></div>
</ResizablePanel>
<ResizableHandle />
<ResizablePanel
defaultSize={50}
minSize={20}
className="p-2 flex flex-col"
>
<div className="h-10 w-full flex gap-2">
<Button
size="sm"
className="min-w-20 justify-between"
variant="secondary"
>
Node <X className="w-3 h-3" />
</Button>
</div>
<div className="w-full grow rounded-lg bg-secondary"></div>
</ResizablePanel>
</ResizablePanelGroup>
</ResizablePanel>
</ResizablePanelGroup>
</>
)
}

View File

@ -0,0 +1,697 @@
{
"inherit": true,
"base": "vs-dark",
"colors": {
"editor.background": "101010",
"editor.foreground": "FFFFFF",
"editor.selectionBackground": "FFFFFF25",
"editor.selectionHighlightBackground": "FFFFFF25",
"editorLineNumber.foreground": "505050",
"editorWidget.background": "101010",
"editorWarning.foreground": "FFC799",
"editorError.foreground": "FF8080",
"editorOverviewRuler.border": "101010",
"editorGutter.addedBackground": "99FFE4",
"editorGutter.deletedBackground": "FF8080",
"editorGutter.modifiedBackground": "FFC799",
"diffEditor.insertedTextBackground": "99FFE440",
"diffEditor.insertedLineBackground": "99FFE440",
"diffEditor.removedTextBackground": "FF808040",
"diffEditor.removedLineBackground": "FF808040",
"sideBar.background": "101010",
"sideBarTitle.foreground": "A0A0A0",
"sideBarSectionHeader.foreground": "A0A0A0",
"sideBarSectionHeader.background": "101010",
"activityBar.background": "101010",
"activityBar.foreground": "A0A0A0",
"activityBarBadge.background": "FFC799",
"activityBarBadge.foreground": "000",
"titleBar.activeBackground": "101010",
"titleBar.inactiveBackground": "101010",
"titleBar.activeForeground": "7E7E7E",
"titleBar.inactiveForeground": "707070",
"tab.activeBorderTop": "FFC799",
"statusBar.debuggingForeground": "FFFFFF",
"statusBar.debuggingBackground": "FF7300",
"statusBar.background": "101010",
"statusBar.foreground": "A0A0A0",
"statusBarItem.remoteBackground": "FFC799",
"statusBarItem.remoteForeground": "000",
"list.activeSelectionForeground": "FFC799",
"list.inactiveSelectionBackground": "232323",
"badge.background": "FFC799",
"badge.foreground": "000",
"button.background": "FFC799",
"button.hoverBackground": "FFCFA8",
"button.foreground": "000",
"focusBorder": "FFC799",
"icon.foreground": "A0A0A0",
"input.background": "1C1C1C",
"list.activeSelectionBackground": "232323",
"list.hoverBackground": "282828",
"list.errorForeground": "FF8080",
"list.highlightForeground": "FFC799",
"selection.background": "666",
"editorBracketHighlight.foreground1": "A0A0A0",
"editorBracketHighlight.foreground2": "A0A0A0",
"editorBracketHighlight.foreground3": "A0A0A0",
"editorBracketHighlight.foreground4": "A0A0A0",
"editorBracketHighlight.foreground5": "A0A0A0",
"editorBracketHighlight.foreground6": "A0A0A0",
"editorBracketHighlight.unexpectedBracket.foreground": "FF8080",
"textLink.foreground": "FFC799",
"textLink.activeForeground": "FFCFA8",
"editorHoverWidget.background": "161616",
"editorHoverWidget.border": "282828",
"scrollbarSlider.background": "34343480",
"scrollbarSlider.hoverBackground": "343434",
"gitDecoration.addedResourceForeground": "99FFE4",
"gitDecoration.untrackedResourceForeground": "99FFE4",
"gitDecoration.modifiedResourceForeground": "FFC799",
"gitDecoration.deletedResourceForeground": "FF8080",
"gitDecoration.ignoredResourceForeground": "595959",
"gitDecoration.conflictingResourceForeground": "FF8080",
"gitDecoration.submoduleResourceForeground": "A0A0A0",
"settings.modifiedItemIndicator": "FFC799",
"terminal.ansiBlack": "101010",
"terminal.ansiBlue": "FFC799",
"terminal.ansiBrightBlack": "101010",
"terminal.ansiBrightBlue": "FFC799",
"terminal.ansiBrightCyan": "99FFE4",
"terminal.ansiBrightGreen": "99FFE4",
"terminal.ansiBrightMagenta": "FBADFF",
"terminal.ansiBrightRed": "FF8080",
"terminal.ansiBrightWhite": "f8f8f2",
"terminal.ansiBrightYellow": "FFC799",
"terminal.ansiCyan": "99FFE4",
"terminal.ansiGreen": "99FFE4",
"terminal.ansiMagenta": "FBADFF",
"terminal.ansiRed": "FF8080",
"terminal.ansiWhite": "e3e3dd",
"terminal.ansiYellow": "FFC799",
"terminal.background": "101010",
"editorGroup.border": "FFC799",
"editorGroupHeader.tabsBackground": "101010",
"tab.inactiveBackground": "1C1C1C",
"tab.border": "1C1C1C"
},
"rules": [
{
"foreground": "595959",
"token": "comment"
},
{
"foreground": "595959",
"token": "punctuation.definition.comment"
},
{
"foreground": "FFFFFF",
"token": "variable"
},
{
"foreground": "FFFFFF",
"token": "string constant.other.placeholder"
},
{
"foreground": "FFFFFF",
"token": "entity.name.tag"
},
{
"foreground": "FFFFFF",
"token": "constant.other.color"
},
{
"foreground": "FF8080",
"token": "invalid"
},
{
"foreground": "FF8080",
"token": "invalid.illegal"
},
{
"foreground": "FBADFF",
"token": "keyword"
},
{
"foreground": "FBADFF",
"token": "storage.modifier"
},
{
"foreground": "FBADFF",
"token": "keyword.control"
},
{
"foreground": "FBADFF",
"token": "constant.other.color"
},
{
"foreground": "FBADFF",
"token": "punctuation.separator.inheritance.php"
},
{
"foreground": "FBADFF",
"token": "punctuation.definition.tag.html"
},
{
"foreground": "FBADFF",
"token": "punctuation.definition.tag.begin.html"
},
{
"foreground": "FBADFF",
"token": "punctuation.definition.tag.end.html"
},
{
"foreground": "FBADFF",
"token": "punctuation.section.embedded"
},
{
"foreground": "FBADFF",
"token": "keyword.other.template"
},
{
"foreground": "FBADFF",
"token": "keyword.other.rust"
},
{
"foreground": "FBADFF",
"token": "keyword.other.fn.rust"
},
{
"foreground": "FBADFF",
"token": "keyword.other.substitution"
},
{
"foreground": "FBADFF",
"token": "storage.type"
},
{
"foreground": "FBADFF",
"token": "keyword.other.import.java"
},
{
"foreground": "FFFFFF",
"token": "storage.modifier.import.java"
},
{
"foreground": "FFC799",
"token": "entity.name.tag"
},
{
"foreground": "FFC799",
"token": "meta.tag.sgml"
},
{
"foreground": "FFC799",
"token": "markup.deleted.git_gutter"
},
{
"foreground": "FFC799",
"token": "entity.name.function"
},
{
"foreground": "FFC799",
"token": "variable.function"
},
{
"foreground": "FFC799",
"token": "support.function"
},
{
"foreground": "FFC799",
"token": "keyword.other.special-method"
},
{
"foreground": "FFFFFF",
"token": "meta.block variable.other"
},
{
"foreground": "FFFFFF",
"token": "support.other.variable"
},
{
"foreground": "FFFFFF",
"token": "string.other.link"
},
{
"foreground": "FFC799",
"token": "constant.numeric"
},
{
"foreground": "FFC799",
"token": "support.constant"
},
{
"foreground": "FFC799",
"token": "constant.character"
},
{
"foreground": "FFC799",
"token": "constant.escape"
},
{
"foreground": "FFC799",
"token": "keyword.other.unit"
},
{
"foreground": "FFC799",
"token": "keyword.other"
},
{
"foreground": "FFC799",
"token": "constant.language.boolean"
},
{
"foreground": "99FFE4",
"token": "string"
},
{
"foreground": "99FFE4",
"token": "constant.other.symbol"
},
{
"foreground": "99FFE4",
"token": "constant.other.key"
},
{
"foreground": "99FFE4",
"token": "keyword.other.fn.rust"
},
{
"foreground": "99FFE4",
"token": "meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js"
},
{
"foreground": "FFC799",
"token": "entity.name"
},
{
"foreground": "FFC799",
"token": "support.type"
},
{
"foreground": "FFC799",
"token": "support.class"
},
{
"foreground": "FFC799",
"token": "support.other.namespace.use.php"
},
{
"foreground": "FFC799",
"token": "meta.use.php"
},
{
"foreground": "FFC799",
"token": "support.other.namespace.php"
},
{
"foreground": "FFC799",
"token": "markup.changed.git_gutter"
},
{
"foreground": "FFC799",
"token": "support.type.sys-types"
},
{
"foreground": "FFFFFF",
"token": "source.css support.type.property-name"
},
{
"foreground": "FFFFFF",
"token": "source.sass support.type.property-name"
},
{
"foreground": "FFFFFF",
"token": "source.scss support.type.property-name"
},
{
"foreground": "FFFFFF",
"token": "source.less support.type.property-name"
},
{
"foreground": "FFFFFF",
"token": "source.stylus support.type.property-name"
},
{
"foreground": "FFFFFF",
"token": "source.postcss support.type.property-name"
},
{
"foreground": "FFFFFF",
"token": "source.postcss support.type.property-name"
},
{
"foreground": "FFFFFF",
"token": "support.type.vendored.property-name.css"
},
{
"foreground": "FFFFFF",
"token": "source.css.scss entity.name.tag"
},
{
"foreground": "FFFFFF",
"token": "variable.parameter.keyframe-list.css"
},
{
"foreground": "FFFFFF",
"token": "meta.property-name.css"
},
{
"foreground": "FFFFFF",
"token": "variable.parameter.url.scss"
},
{
"foreground": "FFFFFF",
"token": "meta.property-value.scss"
},
{
"foreground": "FFFFFF",
"token": "meta.property-value.css"
},
{
"foreground": "FF8080",
"token": "entity.name.module.js"
},
{
"foreground": "FF8080",
"token": "variable.import.parameter.js"
},
{
"foreground": "FF8080",
"token": "variable.other.class.js"
},
{
"foreground": "99FFE4",
"token": "variable.other.constant"
},
{
"foreground": "FFFFFF",
"token": "variable.language"
},
{
"foreground": "FFFFFF",
"token": "entity.name.method.js"
},
{
"foreground": "FFFFFF",
"token": "meta.class-method.js entity.name.function.js"
},
{
"foreground": "FFFFFF",
"token": "variable.function.constructor"
},
{
"foreground": "FFFFFF",
"token": "entity.other.attribute-name"
},
{
"foreground": "FFFFFF",
"token": "meta.property-list.scss"
},
{
"foreground": "FFFFFF",
"token": "meta.attribute-selector.scss"
},
{
"foreground": "FFFFFF",
"token": "meta.property-value.css"
},
{
"foreground": "FFFFFF",
"token": "entity.other.keyframe-offset.css"
},
{
"foreground": "FFFFFF",
"token": "meta.selector.css"
},
{
"foreground": "FFFFFF",
"token": "entity.name.tag.reference.scss"
},
{
"foreground": "FFFFFF",
"token": "entity.name.tag.nesting.css"
},
{
"foreground": "FFFFFF",
"token": "punctuation.separator.key-value.css"
},
{
"foreground": "FFC799",
"token": "text.html.basic entity.other.attribute-name.html"
},
{
"foreground": "FFC799",
"token": "text.html.basic entity.other.attribute-name"
},
{
"foreground": "FFC799",
"token": "entity.other.attribute-name.class"
},
{
"foreground": "FFC799",
"token": "entity.other.attribute-name.id"
},
{
"foreground": "FFC799",
"token": "meta.attribute-selector.scss"
},
{
"foreground": "FFC799",
"token": "variable.parameter.misc.css"
},
{
"foreground": "99FFE4",
"token": "source.sass keyword.control"
},
{
"foreground": "99FFE4",
"token": "meta.attribute-selector.scss"
},
{
"foreground": "99FFE4",
"token": "markup.inserted"
},
{
"foreground": "FF8080",
"token": "markup.deleted"
},
{
"foreground": "A0A0A0",
"token": "markup.changed"
},
{
"foreground": "A0A0A0",
"token": "string.regexp"
},
{
"foreground": "A0A0A0",
"token": "constant.character.escape"
},
{
"fontStyle": "underline",
"token": "*url*"
},
{
"fontStyle": "underline",
"token": "*link*"
},
{
"fontStyle": "underline",
"token": "*uri*"
},
{
"foreground": "FFFFFF",
"token": "tag.decorator.js entity.name.tag.js"
},
{
"foreground": "FFFFFF",
"token": "tag.decorator.js punctuation.definition.tag.js"
},
{
"fontStyle": "italic",
"foreground": "FF8080",
"token": "source.js constant.other.object.key.js string.unquoted.label.js"
},
{
"foreground": "FFC799",
"token": "source.json meta.structure.dictionary.json support.type.property-name.json"
},
{
"foreground": "FFC799",
"token": "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
},
{
"foreground": "FFC799",
"token": "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
},
{
"foreground": "FFC799",
"token": "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
},
{
"foreground": "FFC799",
"token": "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
},
{
"foreground": "FFC799",
"token": "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
},
{
"foreground": "FFC799",
"token": "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
},
{
"foreground": "FFC799",
"token": "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
},
{
"foreground": "FFC799",
"token": "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
},
{
"foreground": "FFFFFF",
"token": "text.html.markdown"
},
{
"foreground": "FFFFFF",
"token": "punctuation.definition.list_item.markdown"
},
{
"foreground": "A0A0A0",
"token": "text.html.markdown markup.inline.raw.markdown"
},
{
"foreground": "FFFFFF",
"token": "text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown"
},
{
"foreground": "FFC799",
"token": "markdown.heading"
},
{
"foreground": "FFC799",
"token": "markup.heading | markup.heading entity.name"
},
{
"foreground": "FFC799",
"token": "markup.heading.markdown punctuation.definition.heading.markdown"
},
{
"foreground": "FFC799",
"token": "markup.heading"
},
{
"foreground": "FFC799",
"token": "markup.inserted.git_gutter"
},
{
"fontStyle": "italic",
"foreground": "FFFFFF",
"token": "markup.italic"
},
{
"fontStyle": "bold",
"foreground": "FFFFFF",
"token": "markup.bold"
},
{
"fontStyle": "bold",
"foreground": "FFFFFF",
"token": "markup.bold string"
},
{
"fontStyle": "bold",
"foreground": "FFFFFF",
"token": "markup.bold markup.italic"
},
{
"fontStyle": "bold",
"foreground": "FFFFFF",
"token": "markup.italic markup.bold"
},
{
"fontStyle": "bold",
"foreground": "FFFFFF",
"token": "markup.quote markup.bold"
},
{
"fontStyle": "bold",
"foreground": "FFFFFF",
"token": "markup.bold markup.italic string"
},
{
"fontStyle": "bold",
"foreground": "FFFFFF",
"token": "markup.italic markup.bold string"
},
{
"fontStyle": "bold",
"foreground": "FFFFFF",
"token": "markup.quote markup.bold string"
},
{
"fontStyle": "underline",
"foreground": "FFC799",
"token": "markup.underline"
},
{
"foreground": "FFFFFF",
"token": "markup.quote punctuation.definition.blockquote.markdown"
},
{
"foreground": "99FFE4",
"token": "markup.quote"
},
{
"foreground": "FFFFFF",
"token": "string.other.link.title.markdown"
},
{
"foreground": "A0A0A0",
"token": "string.other.link.description.title.markdown"
},
{
"foreground": "FFC799",
"token": "constant.other.reference.link.markdown"
},
{
"foreground": "A0A0A0",
"token": "markup.raw.block"
},
{
"foreground": "00000050",
"token": "markup.raw.block.fenced.markdown"
},
{
"foreground": "00000050",
"token": "punctuation.definition.fenced.markdown"
},
{
"foreground": "FFFFFF",
"token": "markup.raw.block.fenced.markdown"
},
{
"foreground": "FFFFFF",
"token": "variable.language.fenced.markdown"
},
{
"foreground": "FFFFFF",
"token": "punctuation.section.class.end"
},
{
"foreground": "FFFFFF",
"token": "variable.language.fenced.markdown"
},
{
"fontStyle": "bold",
"foreground": "65737E",
"token": "meta.separator"
},
{
"foreground": "FFFFFF",
"token": "markup.table"
}
],
"encodedTokensColors": []
}

View File

@ -0,0 +1,9 @@
"use client"
import * as React from "react"
import { ThemeProvider as NextThemesProvider } from "next-themes"
import { type ThemeProviderProps } from "next-themes/dist/types"
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
}

57
components/ui/button.tsx Normal file
View File

@ -0,0 +1,57 @@
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 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",
{
variants: {
variant: {
default:
"bg-primary text-primary-foreground shadow hover:bg-primary/90",
destructive:
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
outline:
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
secondary:
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
default: "h-9 px-4 py-2",
sm: "h-8 rounded-md px-3 text-xs",
lg: "h-10 rounded-md px-8",
icon: "h-9 w-9",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
)
export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean
}
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button"
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
/>
)
}
)
Button.displayName = "Button"
export { Button, buttonVariants }

View File

@ -0,0 +1,45 @@
"use client"
import { DragHandleDots2Icon } from "@radix-ui/react-icons"
import * as ResizablePrimitive from "react-resizable-panels"
import { cn } from "@/lib/utils"
const ResizablePanelGroup = ({
className,
...props
}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
<ResizablePrimitive.PanelGroup
className={cn(
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
className
)}
{...props}
/>
)
const ResizablePanel = ResizablePrimitive.Panel
const ResizableHandle = ({
withHandle,
className,
...props
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
withHandle?: boolean
}) => (
<ResizablePrimitive.PanelResizeHandle
className={cn(
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
className
)}
{...props}
>
{withHandle && (
<div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
<DragHandleDots2Icon className="h-2.5 w-2.5" />
</div>
)}
</ResizablePrimitive.PanelResizeHandle>
)
export { ResizablePanelGroup, ResizablePanel, ResizableHandle }

6
lib/utils.ts Normal file
View File

@ -0,0 +1,6 @@
import { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}

345
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,17 +9,28 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"@monaco-editor/react": "^4.6.0",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-slot": "^1.0.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"lucide-react": "^0.365.0",
"monaco-themes": "^0.4.4",
"next": "14.1.3",
"next-themes": "^0.3.0",
"react": "^18", "react": "^18",
"react-dom": "^18", "react-dom": "^18",
"next": "14.1.3" "react-resizable-panels": "^2.0.16",
"tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7"
}, },
"devDependencies": { "devDependencies": {
"typescript": "^5",
"@types/node": "^20", "@types/node": "^20",
"@types/react": "^18", "@types/react": "^18",
"@types/react-dom": "^18", "@types/react-dom": "^18",
"autoprefixer": "^10.0.1", "autoprefixer": "^10.0.1",
"postcss": "^8", "postcss": "^8",
"tailwindcss": "^3.3.0" "tailwindcss": "^3.3.0",
"typescript": "^5"
} }
} }

View File

@ -1,20 +1,80 @@
import type { Config } from "tailwindcss"; import type { Config } from "tailwindcss"
const config: Config = { const config = {
darkMode: ["class"],
content: [ content: [
"./pages/**/*.{js,ts,jsx,tsx,mdx}", './pages/**/*.{ts,tsx}',
"./components/**/*.{js,ts,jsx,tsx,mdx}", './components/**/*.{ts,tsx}',
"./app/**/*.{js,ts,jsx,tsx,mdx}", './app/**/*.{ts,tsx}',
], './src/**/*.{ts,tsx}',
],
prefix: "",
theme: { theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: { extend: {
backgroundImage: { colors: {
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))", border: "hsl(var(--border))",
"gradient-conic": input: "hsl(var(--input))",
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
}, },
}, },
}, },
plugins: [], plugins: [require("tailwindcss-animate")],
}; } satisfies Config
export default config;
export default config