diff --git a/apps/email/.react-email/.eslintrc.json b/apps/email/.react-email/.eslintrc.json deleted file mode 100644 index 943f99f..0000000 --- a/apps/email/.react-email/.eslintrc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": ["next", "prettier"], - "plugins": ["simple-import-sort", "unused-imports"], - "rules": { - "react/no-unescaped-entities": 0, - "react-hooks/rules-of-hooks": 0, - "no-unused-vars": "off", - "simple-import-sort/imports": [ - "error", - { - // The default grouping, but with no blank lines. - "groups": [["^\\u0000", "^@?\\w", "^", "^\\."]] - } - ], - "simple-import-sort/exports": "error" - } -} \ No newline at end of file diff --git a/apps/email/.react-email/.prettierignore b/apps/email/.react-email/.prettierignore deleted file mode 100644 index 621285d..0000000 --- a/apps/email/.react-email/.prettierignore +++ /dev/null @@ -1,3 +0,0 @@ -dist -.next -node_modules \ No newline at end of file diff --git a/apps/email/.react-email/.prettierrc.js b/apps/email/.react-email/.prettierrc.js deleted file mode 100644 index 14134b0..0000000 --- a/apps/email/.react-email/.prettierrc.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - quoteProps: 'consistent', - singleQuote: true, - trailingComma: 'all', - printWidth: 80, - useTabs: false, - bracketSpacing: true, -}; diff --git a/apps/email/.react-email/.vscode/settings.json b/apps/email/.react-email/.vscode/settings.json deleted file mode 100644 index d067910..0000000 --- a/apps/email/.react-email/.vscode/settings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "typescript.tsdk": "node_modules/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true -} \ No newline at end of file diff --git a/apps/email/.react-email/emails/menthor-sign-newsletter.tsx b/apps/email/.react-email/emails/menthor-sign-newsletter.tsx deleted file mode 100644 index 1a28acb..0000000 --- a/apps/email/.react-email/emails/menthor-sign-newsletter.tsx +++ /dev/null @@ -1,2 +0,0 @@ -import Mail from '../../emails/menthor-sign-newsletter.tsx'; -export default Mail; \ No newline at end of file diff --git a/apps/email/.react-email/next-env.d.ts b/apps/email/.react-email/next-env.d.ts deleted file mode 100644 index 4f11a03..0000000 --- a/apps/email/.react-email/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/email/.react-email/next.config.js b/apps/email/.react-email/next.config.js deleted file mode 100644 index 62cf7fe..0000000 --- a/apps/email/.react-email/next.config.js +++ /dev/null @@ -1,11 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, - swcMinify: true, - experimental: { - appDir: true, - externalDir: true // compile files that are located next to the .react-email directory - }, -}; - -module.exports = nextConfig; \ No newline at end of file diff --git a/apps/email/.react-email/package.json b/apps/email/.react-email/package.json deleted file mode 100644 index 27a3c97..0000000 --- a/apps/email/.react-email/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"react-email-client","version":"0.0.14","description":"The React Email preview application","license":"MIT","scripts":{"dev":"next dev","build":"next build","start":"next start","lint":"next lint","format:check":"prettier --check \"**/*.{ts,tsx,md}\"","format":"prettier --write \"**/*.{ts,tsx,md}\""},"engines":{"node":">=16.0.0"},"dependencies":{"@radix-ui/colors":"0.1.8","@radix-ui/react-collapsible":"1.0.1","@radix-ui/react-popover":"1.0.2","@radix-ui/react-slot":"1.0.1","@radix-ui/react-toggle-group":"1.0.1","@radix-ui/react-tooltip":"1.0.2","@react-email/render":"0.0.7","classnames":"2.3.2","framer-motion":"8.4.6","next":"13.2.4","prism-react-renderer":"1.3.5","react":"18.2.0","react-dom":"18.2.0","@react-email/components":"0.0.6","react-email":"1.9.3"},"devDependencies":{"@types/classnames":"2.3.1","@types/node":"18.11.9","@types/react":"18.0.25","@types/react-dom":"18.0.9","autoprefixer":"10.4.13","eslint":"8.36.0","eslint-config-next":"13.2.4","eslint-config-prettier":"8.7.0","eslint-plugin-simple-import-sort":"10.0.0","eslint-plugin-unused-imports":"2.0.0","postcss":"8.4.19","prettier":"2.8.4","tailwindcss":"3.2.4","typescript":"4.9.3"},"readme":"ERROR: No README data found!","_id":"react-email-client@0.0.14"} \ No newline at end of file diff --git a/apps/email/.react-email/postcss.config.js b/apps/email/.react-email/postcss.config.js deleted file mode 100644 index 12a703d..0000000 --- a/apps/email/.react-email/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; diff --git a/apps/email/.react-email/public/static/Button.svg b/apps/email/.react-email/public/static/Button.svg deleted file mode 100644 index fa73225..0000000 --- a/apps/email/.react-email/public/static/Button.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/apps/email/.react-email/public/static/logo.svg b/apps/email/.react-email/public/static/logo.svg deleted file mode 100644 index 6d05b2e..0000000 --- a/apps/email/.react-email/public/static/logo.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/apps/email/.react-email/public/static/logo_with_text.svg b/apps/email/.react-email/public/static/logo_with_text.svg deleted file mode 100644 index 3ebe9cb..0000000 --- a/apps/email/.react-email/public/static/logo_with_text.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/apps/email/.react-email/src/app/home.tsx b/apps/email/.react-email/src/app/home.tsx deleted file mode 100644 index 130ea73..0000000 --- a/apps/email/.react-email/src/app/home.tsx +++ /dev/null @@ -1,25 +0,0 @@ -'use client'; - -import Link from 'next/link'; -import { Button, Heading, Text } from '../components'; -import { Shell } from '../components/shell'; - -export default function Home({ navItems }) { - return ( - -
- - Welcome to the React Email preview! - - - To start developing your next email template, you can create a{' '} - .jsx or .tsx file under the "emails" folder. - - - -
-
- ); -} diff --git a/apps/email/.react-email/src/app/layout.tsx b/apps/email/.react-email/src/app/layout.tsx deleted file mode 100644 index acfda73..0000000 --- a/apps/email/.react-email/src/app/layout.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import '../styles/globals.css'; -import classnames from 'classnames'; -import { Inter } from 'next/font/google'; - -export const inter = Inter({ - subsets: ['latin'], - variable: '--font-inter', -}); - -export default function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { - return ( - - -
- {children} -
- - - ); -} diff --git a/apps/email/.react-email/src/app/page.tsx b/apps/email/.react-email/src/app/page.tsx deleted file mode 100644 index 06fe4d5..0000000 --- a/apps/email/.react-email/src/app/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { getEmails } from '../utils/get-emails'; -import Home from './home'; - -export default async function Index() { - const { emails } = await getEmails(); - return ; -} - -export const metadata = { - title: 'React Email', -}; diff --git a/apps/email/.react-email/src/app/preview/[slug]/page.tsx b/apps/email/.react-email/src/app/preview/[slug]/page.tsx deleted file mode 100644 index 6222ca6..0000000 --- a/apps/email/.react-email/src/app/preview/[slug]/page.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { render } from '@react-email/render'; -import { promises as fs } from 'fs'; -import { dirname, join as pathJoin } from 'path'; -import { CONTENT_DIR, getEmails } from '../../../utils/get-emails'; -import Preview from './preview'; - -export const dynamicParams = true; - -export async function generateStaticParams() { - const { emails } = await getEmails(); - - const paths = emails.map((email) => { - return { slug: email }; - }); - - return paths; -} - -export default async function Page({ params }) { - const { emails, filenames } = await getEmails(); - const template = filenames.filter((email) => { - const [fileName] = email.split('.'); - return params.slug === fileName; - }); - - const Email = (await import(`../../../../emails/${params.slug}`)).default; - const markup = render(, { pretty: true }); - const plainText = render(, { plainText: true }); - const basePath = pathJoin(process.cwd(), CONTENT_DIR); - const path = pathJoin(basePath, template[0]); - - // the file is actually just re-exporting the default export of the original file. We need to resolve this first - const exportTemplateFile: string = await fs.readFile(path, { - encoding: 'utf-8', - }); - const importPath = exportTemplateFile.match(/import Mail from '(.+)';/)![1]; - const originalFilePath = pathJoin(dirname(path), importPath); - - const reactMarkup: string = await fs.readFile(originalFilePath, { - encoding: 'utf-8', - }); - - return ( - - ); -} - -export async function generateMetadata({ params }) { - return { title: `${params.slug} — React Email` }; -} diff --git a/apps/email/.react-email/src/app/preview/[slug]/preview.tsx b/apps/email/.react-email/src/app/preview/[slug]/preview.tsx deleted file mode 100644 index 88caae7..0000000 --- a/apps/email/.react-email/src/app/preview/[slug]/preview.tsx +++ /dev/null @@ -1,72 +0,0 @@ -'use client'; - -import { usePathname, useRouter, useSearchParams } from 'next/navigation'; -import React from 'react'; -import { CodeContainer } from '../../../components/code-container'; -import { Shell } from '../../../components/shell'; -import { Tooltip } from '../../../components/tooltip'; - -export default function Preview({ - navItems, - slug, - markup, - reactMarkup, - plainText, -}) { - const router = useRouter(); - const pathname = usePathname(); - const searchParams = useSearchParams(); - const [activeView, setActiveView] = React.useState('desktop'); - const [activeLang, setActiveLang] = React.useState('jsx'); - - React.useEffect(() => { - const view = searchParams.get('view'); - const lang = searchParams.get('lang'); - - if (view === 'source' || view === 'desktop') { - setActiveView(view); - } - - if (lang === 'jsx' || lang === 'markup' || lang === 'markdown') { - setActiveLang(lang); - } - }, [searchParams]); - - const handleViewChange = (view: string) => { - setActiveView(view); - router.push(`${pathname}?view=${view}`); - }; - - const handleLangChange = (lang: string) => { - setActiveLang(lang); - router.push(`${pathname}?view=source&lang=${lang}`); - }; - - return ( - - {activeView === 'desktop' ? ( -