diff --git a/app/editor/theme/page.tsx b/app/editor/theme/page.tsx index 9b748548..48721c70 100644 --- a/app/editor/theme/page.tsx +++ b/app/editor/theme/page.tsx @@ -3,7 +3,6 @@ import { cn } from "@/lib/utils"; import Editor from "@/components/editor/editor"; import { Metadata } from "next"; import { Header } from "../../../components/editor/header"; -import { ActionBar } from "@/components/editor/action-bar"; export const metadata: Metadata = { title: "tweakcn — Theme Generator for shadcn/ui", diff --git a/components/editor/action-bar.tsx b/components/editor/action-bar.tsx index bad5f20b..abe119ff 100644 --- a/components/editor/action-bar.tsx +++ b/components/editor/action-bar.tsx @@ -1,8 +1,6 @@ "use client"; -import ThemePresetSelect from "./theme-preset-select"; import { useEditorStore } from "@/store/editor-store"; -import { getPresetThemeStyles, presets } from "@/utils/theme-presets"; import { Button } from "../ui/button"; import { FileCode, RefreshCw, Code, Moon, Sun } from "lucide-react"; import CssImportDialog from "./css-import-dialog"; @@ -15,15 +13,10 @@ import * as SwitchPrimitives from "@radix-ui/react-switch"; import { useTheme } from "../theme-provider"; export function ActionBar() { - const { themeState, applyThemePreset, resetToCurrentPreset, setThemeState } = - useEditorStore(); + const { themeState, resetToCurrentPreset, setThemeState } = useEditorStore(); const [cssImportOpen, setCssImportOpen] = useState(false); const [codePanelOpen, setCodePanelOpen] = useState(false); - const handlePresetChange = (preset: string) => { - applyThemePreset(preset); - }; - const handleCssImport = (css: string) => { // This just shows a success toast for now const { lightColors, darkColors } = parseCssInput(css); diff --git a/components/editor/code-panel-dialog.tsx b/components/editor/code-panel-dialog.tsx index ebddea13..0fcaa207 100644 --- a/components/editor/code-panel-dialog.tsx +++ b/components/editor/code-panel-dialog.tsx @@ -17,10 +17,7 @@ export function CodePanelDialog({ diff --git a/components/editor/code-panel.tsx b/components/editor/code-panel.tsx index 8ad38f44..c74ccc66 100644 --- a/components/editor/code-panel.tsx +++ b/components/editor/code-panel.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; import { Button } from "@/components/ui/button"; -import { Copy, Check, PanelRight } from "lucide-react"; +import { Copy, Check } from "lucide-react"; import { ThemeEditorState } from "@/types/editor"; import { ScrollArea, ScrollBar } from "../ui/scroll-area"; import { ColorFormat } from "../../types"; @@ -14,12 +14,8 @@ import { import { usePostHog } from "posthog-js/react"; import { useEditorStore } from "@/store/editor-store"; import { usePreferencesStore } from "@/store/preferences-store"; -import { - Tooltip, - TooltipContent, - TooltipTrigger, -} from "@/components/ui/tooltip"; import { generateThemeCode } from "@/utils/theme-style-generator"; + interface CodePanelProps { themeEditorState: ThemeEditorState; } diff --git a/components/editor/editor.tsx b/components/editor/editor.tsx index 01d37527..ced646aa 100644 --- a/components/editor/editor.tsx +++ b/components/editor/editor.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { useState } from "react"; +import React from "react"; import { ResizablePanelGroup, ResizablePanel, diff --git a/components/editor/header.tsx b/components/editor/header.tsx index 6988f5b6..e02ee5e5 100644 --- a/components/editor/header.tsx +++ b/components/editor/header.tsx @@ -1,11 +1,10 @@ "use client"; import Link from "next/link"; -import { Moon, Sun, Heart } from "lucide-react"; +import { Heart } from "lucide-react"; import GitHubIcon from "@/assets/github.svg"; import TwitterIcon from "@/assets/twitter.svg"; import DiscordIcon from "@/assets/discord.svg"; -import { useTheme } from "@/components/theme-provider"; import Logo from "@/assets/logo.svg"; import { useGithubStars } from "@/hooks/use-github-stars"; import { SocialLink } from "@/components/social-link"; diff --git a/components/editor/theme-control-panel.tsx b/components/editor/theme-control-panel.tsx index e6ef5651..795dbed5 100644 --- a/components/editor/theme-control-panel.tsx +++ b/components/editor/theme-control-panel.tsx @@ -1,6 +1,6 @@ "use client"; -import React, { useState } from "react"; +import React from "react"; import { ThemeEditorControlsProps, ThemeStyleProps } from "@/types/theme"; import ControlSection from "./control-section"; import ColorPicker from "./color-picker"; @@ -16,7 +16,7 @@ import { import { useEditorStore } from "../../store/editor-store"; import { Label } from "../ui/label"; import { SliderWithInput } from "./slider-with-input"; -import { Tabs, TabsList, TabsTrigger, TabsContent } from "../ui/tabs"; +import { Tabs, TabsList, TabsContent } from "../ui/tabs"; import ThemeFontSelect from "./theme-font-select"; import { DEFAULT_FONT_MONO, @@ -27,11 +27,7 @@ import { } from "../../config/theme"; import { Separator } from "../ui/separator"; import { AlertCircle } from "lucide-react"; -import CssImportDialog from "./css-import-dialog"; -import { toast } from "../ui/use-toast"; -import { parseCssInput } from "../../utils/parse-css-input"; import ShadowControl from "./shadow-control"; -import ThemeControlActions from "./theme-control-actions"; import TabsTriggerPill from "./theme-preview/tabs-trigger-pill"; const ThemeControlPanel = ({ @@ -39,15 +35,7 @@ const ThemeControlPanel = ({ currentMode, onChange, }: ThemeEditorControlsProps) => { - const { - applyThemePreset, - themeState, - resetToCurrentPreset, - resetToDefault, - hasDefaultThemeChanged, - hasCurrentPresetChanged, - } = useEditorStore(); - const [cssImportOpen, setCssImportOpen] = useState(false); + const { applyThemePreset, themeState } = useEditorStore(); const currentStyles = React.useMemo( () => ({ diff --git a/components/editor/theme-preview-panel.tsx b/components/editor/theme-preview-panel.tsx index bdc8f82e..e9ff8a8b 100644 --- a/components/editor/theme-preview-panel.tsx +++ b/components/editor/theme-preview-panel.tsx @@ -47,7 +47,7 @@ const ThemePreviewPanel = ({