Remove theme tool for now

This is likely the biggest thing I'm unsure about for this PR, so I'm going to pull it into a seperate branch so I can merge the system color library in.

I think a better approach for this will be one of two things:
- Have a single next app that covers everything to do with themes (previewing ramps, generated themes, components etc.)
- Create a mono or turborepo that splits things up into packages (system, theme, themes, theme-tool, etc)
This commit is contained in:
Nate Butler 2023-02-25 11:27:18 -05:00
parent 5ce147a2ad
commit 2d8adf4c56
12 changed files with 0 additions and 7269 deletions

View file

@ -1,40 +0,0 @@
module.exports = {
plugins: ["import", "react", "@typescript-eslint"],
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:react/recommended",
"plugin:@next/next/recommended",
"airbnb",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"import/extensions": [0],
"import/no-extraneous-dependencies": "off",
"react/jsx-filename-extension": [1, { extensions: [".tsx", ".jsx"] }],
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"no-underscore-dangle ": 0,
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
},
project: "./",
},
},
};

View file

@ -1,36 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

View file

@ -1,4 +0,0 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}

View file

@ -1 +0,0 @@
# Theme Tool

View file

@ -1,8 +0,0 @@
export default function Head() {
return (
<>
<title>Zed Color Tool</title>
<meta content="width=device-width, initial-scale=1" name="viewport" />
</>
);
}

View file

@ -1,14 +0,0 @@
import * as React from 'react';
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<head />
<body>{children}</body>
</html>
);
}

View file

@ -1,20 +0,0 @@
.main {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 6rem;
min-height: 100vh;
}
.chip {
display: flex;
align-items: center;
justify-content: center;
border-radius: 1px;
color: #000;
font-size: 12px;
font-family: monospace;
text-transform: uppercase;
font-weight: 500;
}

View file

@ -1,77 +0,0 @@
/* eslint-disable import/no-relative-packages */
import * as color from '../../src/system/ref/color';
import { ColorFamily } from '../../src/system/types';
import styles from './page.module.css';
function ColorChips({ colorFamily }: { colorFamily: ColorFamily }) {
const familySubset = [0, 11, 22, 33, 44, 56, 67, 79, 90, 101];
return (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: '1px',
}}
>
<div
style={{
fontFamily: 'monospace',
fontSize: '12px',
fontWeight: 'bold',
padding: '16px 0',
}}
>
{colorFamily.name}
</div>
{colorFamily.scale.colors.map(
(c) =>
familySubset.includes(c.step) && (
<div
key={c.step}
style={{
backgroundColor: c.hex,
color: c.isLight ? 'black' : 'white',
width: '80px',
height: '40px',
}}
className={styles.chip}
>
{c.hex}
</div>
),
)}
</div>
);
}
export default function Home() {
return (
<main>
<div style={{ display: 'flex', gap: '1px' }}>
<ColorChips colorFamily={color.lightgray} />
<ColorChips colorFamily={color.darkgray} />
<ColorChips colorFamily={color.red} />
<ColorChips colorFamily={color.sunset} />
<ColorChips colorFamily={color.orange} />
<ColorChips colorFamily={color.amber} />
<ColorChips colorFamily={color.yellow} />
<ColorChips colorFamily={color.lemon} />
<ColorChips colorFamily={color.citron} />
<ColorChips colorFamily={color.lime} />
<ColorChips colorFamily={color.green} />
<ColorChips colorFamily={color.mint} />
<ColorChips colorFamily={color.cyan} />
<ColorChips colorFamily={color.sky} />
<ColorChips colorFamily={color.blue} />
<ColorChips colorFamily={color.indigo} />
<ColorChips colorFamily={color.purple} />
<ColorChips colorFamily={color.pink} />
<ColorChips colorFamily={color.rose} />
</div>
</main>
);
}

View file

@ -1,8 +0,0 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
}
module.exports = nextConfig

File diff suppressed because it is too large Load diff

View file

@ -1,63 +0,0 @@
{
"name": "zed-theme-tool",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@ianvs/prettier-plugin-sort-imports": "^3.7.1",
"@k-vyn/coloralgorithm": "^1.0.0",
"@next/font": "13.1.6",
"@types/chroma-js": "^2.1.5",
"@types/node": "18.13.0",
"@types/react": "18.0.27",
"@types/react-dom": "18.0.10",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"chroma-js": "^2.4.2",
"eslint": "8.33.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-next": "13.1.6",
"eslint-config-prettier": "^8.6.0",
"eslint-import-resolver-typescript": "3.5.3",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.32.1",
"eslint-plugin-react-hooks": "4.6.0",
"next": "13.1.6",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.12",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.5"
},
"prettier": {
"arrowParens": "always",
"printWidth": 80,
"tabWidth": 4,
"trailingComma": "all",
"singleQuote": true,
"semi": true,
"importOrder": [
"^@/lib/(.*)$",
"^@/app/(.*)$",
"^@/ui/(.*)$",
"^[./]"
],
"importOrderBuiltinModulesToTop": true,
"importOrderCaseInsensitive": true,
"importOrderParserPlugins": [
"typescript",
"jsx",
"decorators-legacy"
],
"importOrderMergeDuplicateImports": true,
"importOrderCombineTypeAndValueImports": true,
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}
}

View file

@ -1,30 +0,0 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"baseUrl": ".",
"paths": {
"@/*": ["./*"],
"@/system/*": ["../src/system/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}