refactor: rename pastel app to color and update all references
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
|
||||
export const PastelIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
export const ColorIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
<svg {...props} fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z" />
|
||||
<circle cx="6.5" cy="11.5" r="1" fill="currentColor" />
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
import { motion } from 'framer-motion';
|
||||
import ToolCard from './ToolCard';
|
||||
import { PastelIcon, UnitsIcon, FigletIcon, MediaIcon } from '@/components/AppIcons';
|
||||
import { ColorIcon, UnitsIcon, FigletIcon, MediaIcon } from '@/components/AppIcons';
|
||||
|
||||
const tools = [
|
||||
{
|
||||
title: 'Pastel',
|
||||
title: 'Color',
|
||||
description: 'Modern color manipulation toolkit with palette generation, accessibility testing, and format conversion. Supports hex, RGB, HSL, Lab, and more.',
|
||||
url: '/pastel',
|
||||
url: '/color',
|
||||
gradient: 'gradient-indigo-purple',
|
||||
accentColor: '#a855f7',
|
||||
badges: ['Open Source', 'WCAG', 'Free'],
|
||||
icon: <PastelIcon className="w-12 h-12 text-white" />,
|
||||
icon: <ColorIcon className="w-12 h-12 text-white" />,
|
||||
},
|
||||
{
|
||||
title: 'Units',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { ColorInfo as ColorInfoType } from '@/lib/pastel/api/types';
|
||||
import { ColorInfo as ColorInfoType } from '@/lib/color/api/types';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Copy } from 'lucide-react';
|
||||
import { toast } from 'sonner';
|
||||
@@ -3,7 +3,7 @@
|
||||
import { HexColorPicker } from 'react-colorful';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { cn } from '@/lib/utils/cn';
|
||||
import { hexToRgb } from '@/lib/pastel/utils/color';
|
||||
import { hexToRgb } from '@/lib/color/utils/color';
|
||||
|
||||
interface ColorPickerProps {
|
||||
color: string;
|
||||
@@ -19,8 +19,8 @@ import {
|
||||
exportAsJavaScript,
|
||||
downloadAsFile,
|
||||
type ExportColor,
|
||||
} from '@/lib/pastel/utils/export';
|
||||
import { pastelAPI } from '@/lib/pastel/api/client';
|
||||
} from '@/lib/color/utils/export';
|
||||
import { colorAPI } from '@/lib/color/api/client';
|
||||
|
||||
interface ExportMenuProps {
|
||||
colors: string[];
|
||||
@@ -46,7 +46,7 @@ export function ExportMenu({ colors, className }: ExportMenuProps) {
|
||||
|
||||
setIsConverting(true);
|
||||
try {
|
||||
const response = await pastelAPI.convertFormat({
|
||||
const response = await colorAPI.convertFormat({
|
||||
colors,
|
||||
format: colorSpace,
|
||||
});
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
useDesaturate,
|
||||
useRotate,
|
||||
useComplement
|
||||
} from '@/lib/pastel/api/queries';
|
||||
} from '@/lib/color/api/queries';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
interface ManipulationPanelProps {
|
||||
@@ -17,7 +17,7 @@ import { cn } from '@/lib/utils/cn';
|
||||
import Logo from '@/components/Logo';
|
||||
import { useSidebar } from './SidebarProvider';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { PastelIcon, UnitsIcon, FigletIcon, MediaIcon } from '@/components/AppIcons';
|
||||
import { ColorIcon, UnitsIcon, FigletIcon, MediaIcon } from '@/components/AppIcons';
|
||||
|
||||
interface NavItem {
|
||||
title: string;
|
||||
@@ -46,9 +46,9 @@ const navigation: NavGroup[] = [
|
||||
icon: <FigletIcon className="h-4 w-4" />
|
||||
},
|
||||
{
|
||||
title: 'Pastel',
|
||||
href: '/pastel',
|
||||
icon: <PastelIcon className="h-4 w-4" />
|
||||
title: 'Color Manipulation',
|
||||
href: '/color',
|
||||
icon: <ColorIcon className="h-4 w-4" />
|
||||
},
|
||||
{
|
||||
title: 'Media Converter',
|
||||
|
||||
Reference in New Issue
Block a user