2
import React, { useState, useEffect } from 'react'; // --- Word Counter --- export const WordCounter: React.FC = () => { const [text, setText] = useState(''); const words = text.trim() ? text.trim().split(/\s+/).length : 0; const chars = text.length; const readTime = Math.ceil(words / 200); return ( setText(e.target.value)} placeholder="Start typing..." className="w-full h-48 bg-[#1E1E2F] p-3 rounded border border-gray-600 focus:border-[#FFD700] outline-none" /> {words} Words {chars} Chars {readTime}m Read Time ) } // --- Color Picker --- export const ColorPicker: React.FC = () => { const [color, setColor] = useState('#FFD700'); // Simple helper to hex to rgb const hexToRgb = (hex: string) => { const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); r...