🔧 ESLint Fixes: - Remove unused 'categoryConfig' variable in Layout.js (line 167) - Remove unused 'isHome' variable in ToolSidebar.js (line 77) - Remove unused 'Sparkles' import in tools.js (line 1) ✅ Build Status: - All ESLint errors resolved - Build now compiles successfully - Ready for deployment 📁 Files Modified: - /src/components/Layout.js - Removed unused categoryConfig for NON_TOOLS - /src/components/ToolSidebar.js - Removed unused isHome for NON_TOOLS - /src/config/tools.js - Removed unused Sparkles import
157 lines
4.3 KiB
JavaScript
157 lines
4.3 KiB
JavaScript
import { Edit3, Table, LinkIcon, Hash, Wand2, GitCompare, Type, Home, Zap } from 'lucide-react';
|
|
|
|
// Master tools configuration - single source of truth
|
|
export const TOOL_CATEGORIES = {
|
|
navigation: {
|
|
name: 'Navigation',
|
|
color: 'from-slate-500 to-slate-600',
|
|
hoverColor: 'slate-600',
|
|
textColor: 'text-slate-600',
|
|
hoverTextColor: 'hover:text-slate-700 dark:hover:text-slate-400'
|
|
},
|
|
editor: {
|
|
name: 'Editor',
|
|
color: 'from-blue-500 to-cyan-500',
|
|
hoverColor: 'blue-600',
|
|
textColor: 'text-blue-600',
|
|
hoverTextColor: 'hover:text-blue-700 dark:hover:text-blue-400'
|
|
},
|
|
encoder: {
|
|
name: 'Encoder',
|
|
color: 'from-purple-500 to-pink-500',
|
|
hoverColor: 'purple-600',
|
|
textColor: 'text-purple-600',
|
|
hoverTextColor: 'hover:text-purple-700 dark:hover:text-purple-400'
|
|
},
|
|
formatter: {
|
|
name: 'Formatter',
|
|
color: 'from-green-500 to-emerald-500',
|
|
hoverColor: 'green-600',
|
|
textColor: 'text-green-600',
|
|
hoverTextColor: 'hover:text-green-700 dark:hover:text-green-400'
|
|
},
|
|
analyzer: {
|
|
name: 'Analyzer',
|
|
color: 'from-orange-500 to-red-500',
|
|
hoverColor: 'orange-600',
|
|
textColor: 'text-orange-600',
|
|
hoverTextColor: 'hover:text-orange-700 dark:hover:text-orange-400'
|
|
},
|
|
non_tools: {
|
|
name: 'Site Navigation',
|
|
color: 'from-indigo-500 to-purple-500',
|
|
hoverColor: 'indigo-600',
|
|
textColor: 'text-indigo-600',
|
|
hoverTextColor: 'hover:text-indigo-700 dark:hover:text-indigo-400'
|
|
}
|
|
};
|
|
|
|
export const TOOLS = [
|
|
{
|
|
path: '/object-editor',
|
|
name: 'Object Editor',
|
|
icon: Edit3,
|
|
description: 'Visual editor for JSON and PHP serialized objects with mindmap visualization',
|
|
tags: ['Visual', 'JSON', 'PHP', 'Objects', 'Editor'],
|
|
category: 'editor'
|
|
},
|
|
{
|
|
path: '/table-editor',
|
|
name: 'Table Editor',
|
|
icon: Table,
|
|
description: 'Import, edit, and export tabular data from URLs, files, or paste CSV/JSON',
|
|
tags: ['Table', 'CSV', 'JSON', 'Data', 'Editor'],
|
|
category: 'editor'
|
|
},
|
|
{
|
|
path: '/url',
|
|
name: 'URL Encoder/Decoder',
|
|
icon: LinkIcon,
|
|
description: 'Encode and decode URLs and query parameters',
|
|
tags: ['URL', 'Encode', 'Decode'],
|
|
category: 'encoder'
|
|
},
|
|
{
|
|
path: '/base64',
|
|
name: 'Base64 Encoder/Decoder',
|
|
icon: Hash,
|
|
description: 'Convert text to Base64 and back with support for files',
|
|
tags: ['Base64', 'Encode', 'Binary'],
|
|
category: 'encoder'
|
|
},
|
|
{
|
|
path: '/beautifier',
|
|
name: 'Code Beautifier/Minifier',
|
|
icon: Wand2,
|
|
description: 'Format and minify JSON, XML, SQL, CSS, and HTML code',
|
|
tags: ['Format', 'Minify', 'Beautify'],
|
|
category: 'formatter'
|
|
},
|
|
{
|
|
path: '/diff',
|
|
name: 'Text Diff Checker',
|
|
icon: GitCompare,
|
|
description: 'Compare two texts and highlight differences line by line',
|
|
tags: ['Diff', 'Compare', 'Text'],
|
|
category: 'analyzer'
|
|
},
|
|
{
|
|
path: '/text-length',
|
|
name: 'Text Length Checker',
|
|
icon: Type,
|
|
description: 'Analyze text length, word count, and other text statistics',
|
|
tags: ['Text', 'Length', 'Statistics'],
|
|
category: 'analyzer'
|
|
}
|
|
];
|
|
|
|
// Non-tool navigation items (homepage, what's new, etc.)
|
|
export const NON_TOOLS = [
|
|
{
|
|
path: '/',
|
|
name: 'Home',
|
|
icon: Home,
|
|
description: 'Back to homepage',
|
|
category: 'non_tools'
|
|
},
|
|
{
|
|
path: '/release-notes',
|
|
name: "What's New",
|
|
icon: Zap,
|
|
description: 'Latest updates and new features',
|
|
category: 'non_tools'
|
|
}
|
|
];
|
|
|
|
// Navigation tools (for sidebar) - combines non-tools and tools
|
|
export const NAVIGATION_TOOLS = [
|
|
...NON_TOOLS,
|
|
...TOOLS
|
|
];
|
|
|
|
// Site configuration
|
|
export const SITE_CONFIG = {
|
|
domain: 'https://dewe.dev',
|
|
title: 'Dewe.Dev',
|
|
subtitle: 'Professional Developer Utilities',
|
|
slogan: 'Code faster, debug smarter, ship better',
|
|
description: 'Professional-grade utilities for modern developers',
|
|
year: new Date().getFullYear(),
|
|
totalTools: TOOLS.length
|
|
};
|
|
|
|
// Helper functions
|
|
export const getCategoryConfig = (categoryKey) => TOOL_CATEGORIES[categoryKey] || TOOL_CATEGORIES.navigation;
|
|
|
|
export const getToolsByCategory = (categoryKey) => TOOLS.filter(tool => tool.category === categoryKey);
|
|
|
|
export const getCategoryStats = () => {
|
|
const stats = {};
|
|
Object.keys(TOOL_CATEGORIES).forEach(key => {
|
|
if (key !== 'navigation') {
|
|
stats[key] = getToolsByCategory(key).length;
|
|
}
|
|
});
|
|
return stats;
|
|
};
|