Skip to content

Commit

Permalink
Cleaned up code
Browse files Browse the repository at this point in the history
  • Loading branch information
bring-shrubbery committed Oct 17, 2023
1 parent 316ea18 commit 77ee3db
Show file tree
Hide file tree
Showing 67 changed files with 4,180 additions and 2,391 deletions.
16 changes: 16 additions & 0 deletions apps/nextjs/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app/globals.css",
"baseColor": "zinc",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
107 changes: 60 additions & 47 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,65 +9,78 @@
"lint": "next lint"
},
"dependencies": {
"@analytics/google-analytics": "^1.0.5",
"@analytics/google-tag-manager": "^0.5.3",
"@monaco-editor/react": "^4.5.1",
"@radix-ui/react-alert-dialog": "^1.0.3",
"@radix-ui/react-checkbox": "^1.0.3",
"@radix-ui/react-collapsible": "^1.0.2",
"@radix-ui/react-dialog": "^1.0.3",
"@radix-ui/react-dropdown-menu": "^2.0.4",
"@radix-ui/react-hover-card": "^1.0.5",
"@radix-ui/react-label": "^2.0.1",
"@radix-ui/react-menubar": "^1.0.2",
"@radix-ui/react-popover": "^1.0.5",
"@radix-ui/react-radio-group": "^1.1.2",
"@radix-ui/react-scroll-area": "^1.0.3",
"@radix-ui/react-select": "^1.2.1",
"@radix-ui/react-separator": "^1.0.2",
"@radix-ui/react-slider": "^1.1.1",
"@radix-ui/react-slot": "^1.0.1",
"@radix-ui/react-switch": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.3",
"@radix-ui/react-toast": "^1.1.3",
"@radix-ui/react-toggle": "^1.0.2",
"@radix-ui/react-tooltip": "^1.0.5",
"@vercel/analytics": "^1.0.1",
"allotment": "^1.19.0",
"analytics": "^0.8.1",
"autoprefixer": "10.4.14",
"class-variance-authority": "^0.6.0",
"@analytics/google-analytics": "^1.0.7",
"@analytics/google-tag-manager": "^0.5.5",
"@hookform/resolvers": "^3.3.2",
"@monaco-editor/react": "^4.6.0",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-alert-dialog": "^1.0.5",
"@radix-ui/react-aspect-ratio": "^1.0.3",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-context-menu": "^2.1.5",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-hover-card": "^1.0.7",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-menubar": "^1.0.4",
"@radix-ui/react-navigation-menu": "^1.1.4",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-progress": "^1.0.3",
"@radix-ui/react-radio-group": "^1.1.3",
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-select": "^1.2.2",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slider": "^1.1.2",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5",
"@radix-ui/react-toggle": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.7",
"@vercel/analytics": "^1.1.1",
"allotment": "^1.19.3",
"analytics": "^0.8.9",
"autoprefixer": "10.4.16",
"class-variance-authority": "^0.7.0",
"clsx": "^1.2.1",
"cmdk": "^0.2.0",
"eslint": "^8.41.0",
"eslint-config-next": "13.4.3",
"highlight.js": "^11.8.0",
"jotai": "^2.1.0",
"lucide-react": "^0.220.0",
"date-fns": "^2.30.0",
"eslint": "^8.51.0",
"eslint-config-next": "13.5.5",
"framer-motion": "^10.16.4",
"highlight.js": "^11.9.0",
"jotai": "^2.4.3",
"lucide-react": "^0.287.0",
"monaco-editor": "^0.38.0",
"monaco-themes": "^0.4.4",
"next": "13.4.3",
"next": "13.5.5",
"next-themes": "^0.2.1",
"postcss": "8.4.23",
"postcss": "8.4.31",
"react": "18.2.0",
"react-day-picker": "^8.9.0",
"react-dom": "18.2.0",
"react-icons": "^4.8.0",
"react-hook-form": "^7.47.0",
"react-icons": "^4.11.0",
"react-use-cookie": "^1.4.0",
"sharp": "^0.32.1",
"sharp": "^0.32.6",
"svg-to-swiftui-core": "workspace:*",
"tailwind-merge": "^1.12.0",
"tailwindcss": "^3.3.2",
"tailwindcss-animate": "^1.0.5",
"typescript": "^5.0.4",
"tailwind-merge": "^1.14.0",
"tailwindcss": "^3.3.3",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.2.2",
"url-join": "^5.0.0",
"usehooks-ts": "^2.9.1",
"xml-formatter": "^3.4.1",
"zustand": "^4.3.8"
"xml-formatter": "^3.5.0",
"zod": "^3.22.4",
"zustand": "^4.4.3"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"@types/node": "^18.16.14",
"@types/react": "18.2.6",
"@types/react-dom": "18.2.4"
"@tailwindcss/typography": "^0.5.10",
"@types/node": "^18.18.5",
"@types/react": "18.2.28",
"@types/react-dom": "18.2.13"
}
}
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import LIGHT_THEME from "monaco-themes/themes/IDLE.json";
import DARK_THEME from "monaco-themes/themes/idleFingers.json";
import { useEffect, useRef, useState } from "react";
import { useTheme } from "next-themes";
import { useToast } from "@/components/use-toast";
import { useToast } from "@/components/ui/use-toast";
import { Settings } from "@/lib/store";
import urlJoin from "url-join";
import xmlFormat from "xml-formatter";
Expand Down
118 changes: 57 additions & 61 deletions apps/nextjs/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,80 +1,76 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 47.4% 11.2%;

--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;

--popover: 0 0% 100%;
--popover-foreground: 222.2 47.4% 11.2%;
--foreground: 240 10% 3.9%;

--card: 0 0% 100%;
--card-foreground: 222.2 47.4% 11.2%;

--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;

--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%;

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;

--destructive: 0 100% 50%;
--destructive-foreground: 210 40% 98%;

--ring: 215 20.2% 65.1%;

--card-foreground: 240 10% 3.9%;

--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;

--primary: 240 5.9% 10%;
--primary-foreground: 0 0% 98%;

--secondary: 240 4.8% 95.9%;
--secondary-foreground: 240 5.9% 10%;

--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 46.1%;

--accent: 240 4.8% 95.9%;
--accent-foreground: 240 5.9% 10%;

--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;

--border: 240 5.9% 90%;
--input: 240 5.9% 90%;
--ring: 240 10% 3.9%;

--radius: 0.5rem;
}

.dark {
--background: 224 71% 4%;
--foreground: 213 31% 91%;

--muted: 223 47% 11%;
--muted-foreground: 215.4 16.3% 56.9%;

--popover: 224 71% 4%;
--popover-foreground: 215 20.2% 65.1%;

--card: 224 71% 4%;
--card-foreground: 213 31% 91%;

--border: 216 34% 17%;
--input: 216 34% 17%;

--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 1.2%;

--secondary: 222.2 47.4% 11.2%;
--secondary-foreground: 210 40% 98%;

--accent: 216 34% 17%;
--accent-foreground: 210 40% 98%;

--destructive: 0 63% 31%;
--destructive-foreground: 210 40% 98%;

--ring: 216 34% 17%;

--radius: 0.5rem;
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;

--card: 240 10% 3.9%;
--card-foreground: 0 0% 98%;

--popover: 240 10% 3.9%;
--popover-foreground: 0 0% 98%;

--primary: 0 0% 98%;
--primary-foreground: 240 5.9% 10%;

--secondary: 240 3.7% 15.9%;
--secondary-foreground: 0 0% 98%;

--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%;

--accent: 240 3.7% 15.9%;
--accent-foreground: 0 0% 98%;

--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;

--border: 240 3.7% 15.9%;
--input: 240 3.7% 15.9%;
--ring: 240 4.9% 83.9%;
}
}

@layer base {
* {
@apply border-border;
}
body {
font-feature-settings: "rlig" 1, "calt" 1;
@apply bg-background text-foreground;
}
}
}
11 changes: 7 additions & 4 deletions apps/nextjs/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ import type { PropsWithChildren } from "react";
// import { Analytics } from "@vercel/analytics/react";

import { Providers } from "./providers";
import { Toaster } from "@/components/toaster";
import { Toaster } from "@/components/ui/toaster";
import { AnalyticsProvider } from "@/components/analytics";

const inter = Inter({ subsets: ["latin"] });
export const fontSans = Inter({
subsets: ["latin"],
variable: "--font-sans",
});

export const metadata: Metadata = {
title: "SVG to SwiftUI Converter",
Expand Down Expand Up @@ -49,8 +52,8 @@ export default function RootLayout({ children }: PropsWithChildren) {
<html lang="en" suppressHydrationWarning className="h-[100vh]">
<body
className={[
inter.className,
"h-full bg-white dark:bg-zinc-800 text-black dark:text-zinc-50 w-full",
fontSans.className,
"antialiased h-full bg-white dark:bg-zinc-800 text-black dark:text-zinc-50 w-full font-sans",
].join(" ")}
>
<Providers>{children}</Providers>
Expand Down
16 changes: 11 additions & 5 deletions apps/nextjs/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
import { Navbar } from "@/components/Navbar";
import { AnnouncementBar } from "@/components/announcement-bar";
import { App } from "./App";
import { getIconContent, getIconList } from "@/lib/utils";
import {
getGithubStarsForRepo,
getIconContent,
getIconList,
} from "@/lib/utils";

export default async function Home() {
const iconList = await getIconList();
const content = await getIconContent(iconList);
// const iconList = await getIconList();
// const content = await getIconContent(iconList);

const githubStars = await getGithubStarsForRepo("quassum/SVG-to-SwiftUI");

return (
<>
<AnnouncementBar />
<Navbar />
<Navbar githubStars={githubStars} />
<main className="block text-black dark:text-white">
<App exampleList={content} />
<App exampleList={[]} />
</main>
{/* <ConsentToast /> */}
</>
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/components/IconLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { cn } from "@/lib/utils";
import Link, { type LinkProps } from "next/link";
import { PropsWithChildren } from "react";
import { toggleVariants } from "./toggle";
import { toggleVariants } from "@/components/ui/toggle";

export const IconLink = ({
href,
Expand Down
Loading

0 comments on commit 77ee3db

Please sign in to comment.