30 Commits

Author SHA1 Message Date
61d2276fad fix: Docker healthcheck IPv6 connection refused
Changed healthcheck from localhost to 127.0.0.1 to force IPv4 connection.
The issue occurred because 'localhost' resolves to IPv6 (::1) but nginx
only listens on IPv4 by default, causing healthchecks to fail.

Error before fix:
  Connecting to localhost ([::1]:80)
  wget: can't connect to remote host: Connection refused

Updated both Dockerfile and docker-compose.yml for consistency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 09:12:30 +01:00
5e84f5d1f8 chore: remove GitHub workflows
Removed .github/workflows directory as the application is now fully
static and deployment workflows are no longer needed. The app can be
deployed to any static hosting platform without CI/CD pipelines.

Static deployment options:
- Vercel, Netlify, Cloudflare Pages (zero config)
- GitHub Pages, S3, CDN
- Self-hosted nginx/Apache
- Docker (optional)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 09:07:57 +01:00
4aed0d4bf9 feat: integrate WebAssembly for zero-latency, offline-first color operations
Some checks failed
Docker Build & Push / build-and-push (push) Failing after 24s
Replaced REST API dependency with @valknarthing/pastel-wasm (130KB) for
complete browser-based color operations. The application is now fully
static (2.2MB total) with zero network latency and offline support.

**Key Changes:**

1. **WASM Integration:**
   - Added @valknarthing/pastel-wasm dependency (0.1.0)
   - Created lib/api/wasm-client.ts wrapper matching API interface
   - Updated lib/api/client.ts to use WASM client by default
   - All 18 color operations now run locally in browser

2. **Static Export Configuration:**
   - Changed next.config.ts output from 'standalone' to 'export'
   - Disabled image optimization for static export
   - Removed API proxy route (app/api/pastel/[...path]/route.ts)
   - Updated package.json scripts (removed dev:api, added serve)

3. **Docker Optimization:**
   - Migrated from Node.js standalone to nginx-alpine
   - Created nginx.conf with SPA routing and WASM mime types
   - Updated Dockerfile for static file serving
   - Reduced image size from ~150MB to ~25MB
   - Changed port from 3000 to 80 (standard HTTP)
   - Simplified docker-compose.yml (removed pastel-api service)

4. **Documentation Updates:**
   - Updated README.md with WASM benefits and deployment options
   - Added Key Benefits section highlighting zero-latency features
   - Rewrote deployment section for static hosting platforms
   - Updated CLAUDE.md tech stack and architecture
   - Removed obsolete docs: DEV_SETUP.md, DOCKER.md, IMPLEMENTATION_PLAN.md

**Benefits:**
- 🚀 Zero Latency - All operations run locally via WebAssembly
- 📱 Offline First - Works completely offline after initial load
- 🌐 No Backend - Fully static, deploy anywhere
-  Fast - Native-speed color operations in browser
- 📦 Small - 2.2MB total (130KB WASM, 2.07MB HTML/CSS/JS)

**Deployment:**
Can now be deployed to any static hosting platform:
- Vercel, Netlify, Cloudflare Pages (zero config)
- GitHub Pages, S3, CDN
- Self-hosted nginx/Apache
- Docker (optional, nginx-based)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 09:06:25 +01:00
valknarness
e6b693dbd8 fix: correct padding alignment between navbar, content, and footer
The previous implementation had misaligned padding structure:
- Navbar/Footer: padding INSIDE max-width container (max-w-7xl mx-auto px-8)
- Page content: padding OUTSIDE max-width container (px-8 on outer, max-w-7xl inside)

This caused content to have double horizontal spacing and misalign with
the navbar and footer borders.

**Fix:**
Move px-8 from outer container to inner max-w-7xl container on all pages,
matching the navbar and footer pattern.

**Structure (all components now consistent):**
```
<div className="py-12">              <!-- vertical padding only -->
  <div className="max-w-7xl mx-auto px-8">  <!-- max-width + horizontal padding -->
    <!-- content -->
  </div>
</div>
```

Now navbar, main content, and footer all align perfectly at the same
left and right edges.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 17:49:36 +01:00
valknarness
638ba67189 fix: correct keyboard shortcut modifier matching logic
The previous implementation had inverted logic that prevented keyboard
shortcuts from working. The check `shortcut.ctrl ? event.ctrlKey : !event.ctrlKey`
meant that if ctrl wasn't specified, it required ctrl to NOT be pressed,
which broke shortcuts with only meta keys.

**Changes:**
- Fix modifier matching: only check modifiers that are explicitly required (=== true)
- Add check to prevent unwanted modifiers (e.g., if only meta+c, reject ctrl+meta+c)
- Improve cross-platform meta/cmd key handling (Mac uses metaKey, Windows/Linux uses ctrlKey)
- Allow meta key to permit ctrl on non-Mac platforms (meta is treated as ctrl equivalent)

**Now working shortcuts in playground:**
- Cmd/Ctrl+C: Copy color to clipboard
- Cmd/Ctrl+S: Share color (copy URL)
- Cmd/Ctrl+R: Generate random color

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 16:22:42 +01:00
valknarness
0d03156e04 style: standardize layout widths and padding across all pages
Ensure consistent spacing and alignment between header, main content, and footer:
- Update Navbar to use max-w-7xl and px-8 (matching Footer)
- Standardize all page containers to use px-8 py-12 padding
- Change home page from max-w-5xl to max-w-7xl for consistency
- Update all 12 pages to use consistent padding (px-8 py-12 instead of p-8)

This creates a unified visual alignment across the entire application,
with all content sections (navbar, main, footer) using the same
max-width (7xl) and horizontal padding (px-8).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 16:20:59 +01:00
valknarness
ea44b592dd fix: await params in API route handlers for Next.js 16 compatibility
In Next.js 16, route handler params are now async Promises.
Updated all HTTP method handlers (GET, POST, PUT, DELETE, PATCH)
to properly await the params before accessing path segments.

This fixes the build error:
"Type 'Promise<{ path: string[] }>' is not assignable to type '{ path: string[] }'"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 16:10:30 +01:00
valknarness
27ff7f7ffd feat: implement runtime configuration with API proxy pattern
Replace build-time NEXT_PUBLIC_* environment variables with server-side
runtime configuration. This allows changing the Pastel API URL without
rebuilding the Docker image.

**Changes:**
- Add Next.js API proxy route at /api/pastel/[...path] for server-side proxying
- Update API client to use proxy endpoint instead of direct API URL
- Replace NEXT_PUBLIC_API_URL with server-side PASTEL_API_URL
- Remove build arguments from Dockerfile (no longer needed)
- Simplify docker-compose.yml to use runtime environment variables only
- Update all .env files to reflect new configuration approach
- Add comprehensive DOCKER.md documentation

**Benefits:**
- No rebuild required to change API URL
- Same image works across all environments (dev/staging/prod)
- Better security (API URL not exposed in client bundle)
- Simpler deployment and configuration management

**Migration:**
Old: NEXT_PUBLIC_API_URL (build-time, embedded in bundle)
New: PASTEL_API_URL (runtime, read by server proxy)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 16:05:55 +01:00
valknarness
8fa5511660 fix: add curl and pass environment variables to Docker build
- Install curl in Alpine image for health checks
- Add ARG and ENV declarations for NEXT_PUBLIC_* variables in builder stage
- Pass build args from docker-compose.yml to Dockerfile
- Update health checks to use curl instead of node -e
- Update .env.example with helpful comments for Docker vs local dev

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 15:48:10 +01:00
valknarness
0c8f3e0d0f fix: add required permissions for GitHub Actions attestations
Add id-token and attestations permissions to Docker workflow:
- id-token: write - Required for OIDC token generation
- attestations: write - Required for artifact attestations

Also add missing step ID to build-and-push step so attestation
step can reference the digest output.

Fixes: Error: Failed to get ID token: Unable to get
ACTIONS_ID_TOKEN_REQUEST_URL env variable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 15:04:39 +01:00
valknarness
20ba0f94e6 fix: add files to public directory for Docker build
Add placeholder files to ensure public directory is not empty:
- robots.txt for SEO
- .gitkeep to track directory in git

Fixes Docker buildx cache key calculation error where empty
public directory caused build to fail.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 14:53:53 +01:00
valknarness
a109a18627 feat: add footer and fix TypeScript build errors
Add comprehensive footer component with:
- Four-column responsive layout (About, Resources, Documentation, Community)
- Links to all major features and GitHub repositories
- Copyright notice with dynamic year
- Attribution to Pastel CLI and David Peter
- MIT License link
- Built with acknowledgments

Fix TypeScript compilation errors:
- Remove all references to `comingSoon` property in accessibility/page.tsx
- Remove all references to `comingSoon` property in palettes/page.tsx
- Clean up conditional rendering logic

All features now properly linked and accessible.
Build now completes successfully for Docker deployment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 14:49:07 +01:00
valknarness
75e21646b3 feat: add Docker support with GitHub Actions CI/CD
Add comprehensive Docker deployment with automated builds:

**Docker Configuration:**
- Multi-stage Dockerfile for optimized Next.js production builds
  - Stage 1: Install dependencies with pnpm
  - Stage 2: Build application with standalone output
  - Stage 3: Minimal runtime image with non-root user
  - Includes health check endpoint
  - Final image size optimized
- .dockerignore for efficient build context
- Enable standalone output in next.config.ts for Docker

**GitHub Actions Workflow:**
- Automated Docker image builds on push to main and tags
- Multi-platform support (linux/amd64, linux/arm64)
- Push to GitHub Container Registry (ghcr.io)
- Smart tagging strategy:
  - `latest` for main branch
  - `vX.X.X` for semver tags
  - `main-SHA` for commit-specific images
- Build cache optimization with GitHub Actions cache
- Artifact attestation for supply chain security

**Docker Compose:**
- Combined stack for UI + API
- Environment variable configuration
- Health checks for both services
- Automatic restart policies
- Shared network configuration

**Documentation:**
- Updated README with Docker deployment instructions
- Pre-built image usage from GHCR
- Docker Compose setup guide
- Local build instructions
- Available image tags reference

**Production Ready:**
- Images automatically published to ghcr.io/valknarness/pastel-ui
- Supports both x64 and ARM64 architectures
- Health checks for container orchestration
- Environment-based configuration
- Non-root user for security

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 14:36:30 +01:00
valknarness
93889ab9bd fix: correct API integration and complete missing features
Fix API response format mismatches and implement all remaining features:

**API Integration Fixes:**
- Fix ManipulationPanel to use `colors` instead of `results` from API responses
- Fix gradient endpoint to use `gradient` array from API response
- Fix color blindness simulator to use correct field names (`input`/`output` vs `original`/`simulated`)
- Fix text color optimizer request field (`backgrounds` vs `background_colors`)
- Fix method name casing: `simulateColorBlindness` (capital B)
- Add palette generation endpoint integration

**Type Definition Updates:**
- Update GradientData to match API structure with `gradient` array
- Update ColorBlindnessData to use `colors` with `input`/`output`/`difference_percentage`
- Update TextColorData to use `colors` with `textcolor`/`wcag_aa`/`wcag_aaa` fields
- Add PaletteGenerateRequest and PaletteGenerateData types

**Completed Features:**
- Harmony Palettes: Now uses dedicated `/palettes/generate` API endpoint
  - Simplified from 80 lines of manual color theory to single API call
  - Supports 6 harmony types: monochromatic, analogous, complementary, split-complementary, triadic, tetradic
- Text Color Optimizer: Full implementation with WCAG compliance checking
  - Automatic black/white text color selection
  - Live preview with contrast ratios
  - AA/AAA compliance indicators
- Color Blindness Simulator: Fixed and working
  - Shows difference percentage for each simulation
  - Side-by-side comparison view
- Gradient Creator: Fixed to use correct API response structure
- Batch Operations: Fixed to extract output colors correctly

**UI Improvements:**
- Enable all accessibility tool cards (remove "Coming Soon" badges)
- Enable harmony palettes card
- Add safety check for gradient state to prevent undefined errors

All features now fully functional and properly integrated with Pastel API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 14:33:38 +01:00
valknarness
cb3fcdd806 docs: add development setup guide
Add comprehensive DEV_SETUP.md with:
- Instructions to run UI and API together or separately
- Port configuration (UI: 3000, API: 3001)
- Troubleshooting guide for common issues
- List of all available features with URLs
- Development commands reference

Helps developers get started quickly and debug API connectivity issues.
2025-11-07 13:56:29 +01:00
valknarness
fd2cea8f47 fix: resolve hydration errors in playground
- Fix nested button error in color history by using div with role=button
- Add keyboard accessibility (Enter/Space) to color history swatches
- Add type guard for ColorInfo.name to handle object values
- Add aria-label to remove button for better accessibility

Fixes React hydration errors and improves accessibility.
2025-11-07 13:53:23 +01:00
valknarness
0ac49c0600 feat: implement missing features and improvements
Add comprehensive feature set and fixes:

**Theme Improvements:**
- Fix theme flickering by adding blocking script in layout
- Prevents FOUC (Flash of Unstyled Content)
- Smooth transitions between light and dark modes

**Tailwind CSS v4 Migration:**
- Convert globals.css to Tailwind CSS v4 format
- Use @import "tailwindcss" instead of @tailwind directives
- Implement @theme block with OkLCH color space
- Add @plugin directives for forms and typography
- Use :root and .dark class-based theming
- Add all custom animations in CSS
- Create postcss.config.mjs with @tailwindcss/postcss

**Dev Environment:**
- Add .env.local with API on port 3001
- Add dev:api and dev:all scripts to package.json
- Create .env for API with port 3001 configuration
- Enable running both UI and API simultaneously

**New Features Implemented:**

1. **Harmony Palettes** (app/palettes/harmony/page.tsx)
   - Generate color harmonies based on color theory
   - Support for 6 harmony types:
     - Monochromatic
     - Analogous (±30°)
     - Complementary (180°)
     - Split-complementary
     - Triadic (120° spacing)
     - Tetradic/Square (90° spacing)
   - Uses complement and rotate API endpoints
   - Export harmonies in multiple formats

2. **Color Blindness Simulator** (app/accessibility/colorblind/page.tsx)
   - Simulate 3 types of color blindness:
     - Protanopia (red-blind, ~1% males)
     - Deuteranopia (green-blind, ~1% males)
     - Tritanopia (blue-blind, rare)
   - Side-by-side comparison of original vs simulated
   - Support for multiple colors (up to 10)
   - Educational information about each type
   - Accessibility tips and best practices

3. **Batch Operations** (app/batch/page.tsx)
   - Process up to 100 colors at once
   - Text input (line-separated or comma-separated)
   - 5 operations supported:
     - Lighten/Darken
     - Saturate/Desaturate
     - Rotate hue
   - Adjustable amount slider
   - Export processed colors
   - Live validation and color count

**API Query Hooks:**
- Add useSimulateColorBlindness hook
- Add useTextColor hook
- Export ColorBlindnessRequest and TextColorRequest types

**Files Added:**
- postcss.config.mjs
- .env.local
- ../pastel-api/.env
- app/accessibility/colorblind/page.tsx
- app/palettes/harmony/page.tsx

**Files Modified:**
- app/globals.css (Tailwind v4 migration)
- app/layout.tsx (theme flicker fix)
- app/batch/page.tsx (functional implementation)
- lib/api/queries.ts (new hooks)
- package.json (dev scripts)
- tailwind.config.ts (simplified, CSS-first)

All features build successfully and are ready for testing.
Development server can now run with API via `pnpm dev:all`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 13:47:16 +01:00
valknarness
74ba6cf47d fix: tailwind 2025-11-07 13:32:17 +01:00
valknarness
494b2a450b feat: implement UX enhancements for playground
Add comprehensive UX improvements to color playground:

**URL State Sharing:**
- Implement URL parameter sync for colors
- Add share button to copy playground URLs
- Wrap in Suspense boundary for Next.js 16 compatibility
- Colors persist in URL for easy sharing

**Keyboard Shortcuts:**
- Create reusable useKeyboard hook with modifier support
- Add Cmd/Ctrl+C to copy current color
- Add Cmd/Ctrl+S to share color URL
- Add Cmd/Ctrl+R for random color generation
- Display keyboard hints in playground header
- Cross-platform support (Mac/Windows/Linux)

**Color History:**
- Implement Zustand store with localStorage persistence
- Track up to 50 most recent colors with timestamps
- Auto-deduplicate and keep most recent entry
- Add visual history grid in playground
- Click to restore previous colors
- Individual color removal with hover UI
- Clear all history option

**Playground UI Enhancements:**
- Add visual keyboard shortcut indicators (⌘C, ⌘S, ⌘R)
- Implement Recent Colors section with 5-column grid
- Add hover effects for history color swatches
- Individual remove buttons on hover
- Toast notifications for all actions
- Improved button layout and spacing

**Files Added:**
- lib/hooks/useKeyboard.ts - Keyboard shortcut management
- lib/stores/historyStore.ts - Color history with persistence

**Files Modified:**
- app/playground/page.tsx - Integrated all UX features

Successfully builds with all features working.
Ready for user testing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 12:30:33 +01:00
valknarness
89bd011537 feat: add comprehensive export functionality for palettes
Implement full palette export system with multiple formats:

**Export Utilities (lib/utils/export.ts):**
- exportAsCSS() - CSS custom properties (:root variables)
- exportAsSCSS() - SCSS variables ($color-name format)
- exportAsTailwind() - Tailwind config module export
- exportAsJSON() - Structured JSON with color objects
- exportAsJavaScript() - JavaScript array of colors
- downloadAsFile() - Browser download helper
- ExportColor interface for typed exports

**ExportMenu Component:**
- Format selector dropdown (5 formats)
- Live preview of export code
- Syntax-highlighted code display
- Copy to clipboard button
- Download as file button
- Success feedback (Check icon + toast)
- Responsive layout
- Conditional rendering (empty state)

**Export Formats:**

1. CSS Variables:
   ```css
   :root {
     --color-1: #ff0099;
     --color-2: #0099ff;
   }
   ```

2. SCSS Variables:
   ```scss
   $color-1: #ff0099;
   $color-2: #0099ff;
   ```

3. Tailwind Config:
   ```js
   module.exports = {
     theme: {
       extend: {
         colors: {
           'color-1': '#ff0099',
         },
       },
     },
   };
   ```

4. JSON:
   ```json
   {
     "colors": [
       { "name": "color-1", "hex": "#ff0099" }
     ]
   }
   ```

5. JavaScript Array:
   ```js
   const colors = ['#ff0099', '#0099ff'];
   ```

**Integration:**
- Added to Gradient Creator page
- Added to Distinct Colors page
- Conditional rendering (shows only when colors exist)
- Proper spacing and layout

**Features:**
- Real-time preview of generated code
- Copy with toast notification
- Download with proper file extensions
- Format-specific filenames
- Clean, readable output
- Proper indentation and formatting

**User Experience:**
- Select format from dropdown
- See live preview immediately
- One-click copy or download
- Success feedback
- Professional code formatting

Build successful! Export functionality working on all palette pages.

Next: Keyboard shortcuts and URL sharing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 12:19:52 +01:00
valknarness
41d463873e feat: add comprehensive visual improvements and polished UI
Major visual enhancements for professional look and feel:

**New Components:**
- Skeleton component for loading states
  - Pulse animation
  - Reusable for any content type
  - Consistent styling

**Enhanced Animations:**
- Added 8 new custom animations:
  - fade-in (smoother 0.3s)
  - slide-up/down (enhanced 0.4s)
  - slide-in-right/left (directional)
  - scale-in (zoom effect)
  - bounce-gentle (subtle bounce)
  - shimmer (loading effect)

**Global Visual Improvements:**
- Smooth theme transitions (200ms cubic-bezier)
- Custom scrollbar styling with hover states
- Smooth scroll behavior enabled
- Theme transitioning class to prevent flash
- Better transition timing functions

**Component Enhancements:**

1. Home Page:
   - Staggered fade-in animations (0s, 0.1s, 0.2s-0.4s delays)
   - Scale animations on feature cards
   - Hover effects with shadow and border color change
   - Responsive padding adjustments
   - Enhanced button hover (scale + shadow)

2. ColorSwatch:
   - Improved hover scale (105% → 110%)
   - Added shadow on hover
   - Backdrop blur on overlay
   - Active state scale down (95%)
   - Smoother transitions (200ms)
   - Scale-in animation for copy icon

3. Button Component:
   - Active state scale down effect
   - Shadow on hover for primary/destructive
   - Border color change on outline hover
   - Smoother transitions (200ms)
   - Focus ring offset for better visibility

**Micro-interactions:**
- All buttons have active:scale-95
- Cards lift on hover with shadows
- Smooth color transitions on theme switch
- Icons animate on appearance
- Links scale up on hover

**Visual Consistency:**
- Consistent timing (200ms for interactions)
- Unified hover patterns across components
- Standardized shadow depths
- Better focus indicators
- Smooth scroll throughout

**Performance:**
- No janky transitions
- Optimized animations (transform + opacity)
- Hardware-accelerated properties
- Minimal repaints

The UI now feels polished, professional, and delightful to use!

Build successful - all visual enhancements working.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 12:04:46 +01:00
valknarness
764ac90e60 feat: implement accessibility tools and named colors explorer
Add comprehensive accessibility features and color naming:

**Color Utilities (lib/utils/color.ts):**
- getRelativeLuminance() - WCAG 2.1 luminance calculation
- getContrastRatio() - Contrast ratio between two colors
- hexToRgb() - Convert hex to RGB
- checkWCAGCompliance() - AA/AAA compliance checker
- Full WCAG 2.1 specification implementation

**New UI Component:**
- Badge component - Status indicators
  - Variants: default, success, warning, destructive, outline
  - Used for pass/fail indicators
  - Accessible focus states

**Accessibility Pages:**

1. Contrast Checker (/accessibility/contrast)
   - Dual color pickers (foreground/background)
   - Real-time contrast ratio calculation
   - Live text preview with both colors
   - WCAG 2.1 compliance display:
     - Level AA: Normal text (4.5:1), Large text (3:1), UI (3:1)
     - Level AAA: Normal text (7:1), Large text (4.5:1)
   - Pass/Fail badges for each criterion
   - Swap colors button
   - Visual feedback with color-coded results

2. Accessibility Dashboard (/accessibility)
   - Overview of all accessibility tools
   - Feature cards with icons
   - Educational content about WCAG 2.1
   - Standards explanation (AA vs AAA)
   - Links to each tool

**Named Colors Page (/names):**
- Display all 148 CSS/X11 named colors
- Search by name or hex value
- Sort options (name, hue)
- Responsive grid layout (2-6 columns)
- Click to copy color
- Color name and hex display
- Loading and error states
- Empty state for no results
- Real-time filtering

**Batch Operations Page (/batch):**
- Placeholder "Coming Soon" page
- Feature preview list
- Planned capabilities description
- Professional coming soon message

**Features Implemented:**
- Real WCAG calculations (not approximations)
- Live contrast ratio updates
- Interactive color swapping
- Comprehensive compliance checking
- Educational content
- Named colors from API
- Search and filtering
- Responsive layouts

**Build Status:**
 11 pages successfully rendering
 All TypeScript checks passing
 No build errors

All major sections now have functional or placeholder pages!

Next: Polish, testing, and additional enhancements.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:42:55 +01:00
valknarness
c3745bd6b7 feat: implement palette generation features
Add complete palette generation system with multiple methods:

**New Components:**
- ColorSwatch component - Individual color display
  - Click to copy to clipboard
  - Hover effects with copy icon
  - Configurable sizes (sm, md, lg)
  - Optional color label display
  - Check icon on successful copy

- PaletteGrid component - Grid display for color palettes
  - Responsive grid layout (3-6 columns)
  - Click handler for color selection
  - Empty state message
  - Flexible and reusable

- Select component - Dropdown selector
  - Consistent styling with other inputs
  - Optional label support
  - Keyboard accessible
  - Focus ring styling

**Palette Pages:**

1. Gradient Creator (/palettes/gradient)
   - Multiple color stop editor (add/remove)
   - Configurable step count (2-1000)
   - Color space selection (RGB, HSL, Lab, LCH, OkLab, OkLCH)
   - Live gradient preview bar
   - Full palette grid display
   - Interactive color pickers for each stop
   - Real-time generation

2. Distinct Colors (/palettes/distinct)
   - Count selector (2-100 colors)
   - Distance metric selection (CIE76, CIEDE2000)
   - Simulated annealing algorithm
   - Statistics display:
     - Minimum distance
     - Average distance
     - Generation time
   - Loading state with progress message
   - Quality metrics for generated palette

3. Palettes Dashboard (/palettes)
   - Overview of all palette generators
   - Feature cards with icons
   - "Coming Soon" badge for harmony palettes
   - Quick navigation to each generator
   - Feature highlights for each method

**Features:**
- All palette generators integrated with Pastel API
- Toast notifications for success/error
- Loading states during generation
- Copy colors to clipboard
- Responsive layouts
- Empty states
- Error handling

**API Integration:**
- useGenerateGradient mutation
- useGenerateDistinct mutation
- Proper error handling and loading states
- Result caching with React Query

Build successful! 3 new palette pages rendering.

Next: Harmony palettes, accessibility tools, and named colors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:38:20 +01:00
valknarness
75bfecee4d feat: implement navigation and dark/light theme system
Add complete navigation and theming infrastructure:

**Theme System:**
- ThemeProvider component with React Context
  - Supports light, dark, and system themes
  - Persists preference to localStorage
  - Auto-detects system theme preference
  - Listens for system theme changes
  - Smooth theme transitions

- ThemeToggle component
  - Sun/Moon icon toggle button
  - Accessible with ARIA labels
  - Shows current theme state
  - Keyboard accessible

**Navigation:**
- Navbar component with sticky header
  - Gradient logo with Palette icon
  - Desktop horizontal navigation
  - Mobile responsive menu
  - Active route highlighting
  - Backdrop blur effect
  - Links to all main sections:
    - Home
    - Playground
    - Palettes
    - Accessibility
    - Named Colors
    - Batch Operations

**Layout Updates:**
- Integrated Navbar into root layout
- Added ThemeProvider to Providers wrapper
- Proper HTML suppressHydrationWarning for theme
- Container-based responsive layout

**Features:**
- Theme persists across page reloads
- System theme preference detection
- Active navigation state
- Smooth hover transitions
- Mobile-first responsive design
- Accessible navigation with proper semantics

**Styling:**
- Gradient text logo (pink → purple → blue)
- Sticky top navbar with backdrop blur
- Border bottom for visual separation
- Consistent spacing and padding
- Mobile menu slides in smoothly

Build successful! Navigation and theming complete.

Next: Palette generation pages and additional features.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:35:05 +01:00
valknarness
94ea87ca83 feat: implement color manipulation tools with interactive sliders
Add complete color manipulation interface to playground:

**New Components:**
- Slider component - Customizable range input with label and value display
  - Smooth animations on thumb hover
  - Keyboard accessible
  - Shows current value with optional suffix
  - Tailwind-styled for consistency

- ManipulationPanel component - Full color manipulation controls
  - Lighten/Darken sliders (0-100% range)
  - Saturate/Desaturate sliders (0-100% range)
  - Hue rotation slider (-180° to +180°)
  - Complementary color quick action
  - All operations integrated with Pastel API
  - Toast notifications for success/error
  - Loading states during API calls

**Playground Enhancements:**
- Replaced placeholder quick action buttons with ManipulationPanel
- Full integration with color manipulation mutations
- Real-time color updates after each operation
- User-friendly feedback with toast messages
- Amount controls for precise adjustments

**Features:**
- Live preview of manipulation results
- Configurable amounts before applying
- Success/error handling with helpful messages
- Disabled state during API operations
- Smooth user experience with immediate feedback

**API Integration:**
- useLighten, useDarken mutations
- useSaturate, useDesaturate mutations
- useRotate for hue rotation
- useComplement for complementary colors
- All mutations with proper error handling

Build successful! Color manipulation tools fully functional.

Next: Navigation, theme system, and additional UI components.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:28:35 +01:00
valknarness
2de8e9dc11 docs: add comprehensive implementation plan for feature completeness
Create detailed roadmap to MVP and beyond:

**Plan Overview:**
- 15 phases covering all features from CLAUDE.md
- Estimated 40-55 hours total development time
- 4-6 week timeline with 4 sprints
- Clear priority ordering (High/Medium/Low)

**Phases Defined:**
1.  Foundation - COMPLETE (Next.js 16, TypeScript, API client)
2.  Core Color Components - COMPLETE (Picker, Display, Info, Playground)
3. 🚧 Color Manipulation Tools - IN PROGRESS (sliders, operations, history)
4. Palette Generation - 4 sub-pages (harmony, distinct, gradient, dashboard)
5. Accessibility Tools - Contrast checker, colorblind simulator
6. Named Colors Explorer - Searchable grid of 148 colors
7. Batch Operations - CSV/JSON upload and processing
8. Navigation & Layout - Navbar, theme toggle, command palette
9. Enhanced UI Components - 10+ additional components
10. State Management - Zustand stores + localStorage
11. Utility Functions - Color, export, keyboard helpers
12. Documentation - Docs page and in-app help
13. Testing - Unit tests (Vitest) + E2E (Playwright)
14. Performance Optimization - Code splitting, caching
15. CI/CD & Deployment - GitHub Actions, Vercel

**Sprint 1 Priority (Week 1):**
- Color manipulation tools (lighten, darken, saturate, etc.)
- Navigation with theme toggle
- Essential UI components (Slider, Tabs, Dialog)

**Success Criteria for MVP:**
- All color manipulation tools working
- 2+ palette generation methods
- Contrast checker functional
- Named colors searchable
- Export to CSS/JSON
- Mobile responsive
- Deployed to production

**Timeline:**
- Week 1: Core manipulation + navigation (12-15h)
- Week 2: Palettes + state management (10-13h)
- Week 3: Accessibility + extras (12-15h)
- Week 4: Testing + deployment (6-12h)

Ready to proceed with Sprint 1 implementation!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:25:26 +01:00
valknarness
173d81d9d4 feat: implement color playground with interactive picker and info display
Add complete color manipulation interface:

**Color Components:**
- ColorPicker - Interactive hex color picker with text input
  - Uses react-colorful for visual selection
  - Manual input support for any color format
  - Real-time updates

- ColorDisplay - Large color preview swatch
  - Configurable sizes (sm, md, lg, xl)
  - Optional border styling
  - Accessible with ARIA labels

- ColorInfo - Comprehensive color information display
  - Shows all formats: Hex, RGB, HSL, Lab, OkLab
  - Copy to clipboard functionality for each format
  - Displays brightness, luminance, light/dark type
  - Shows named color matches

**API Integration:**
- React Query hooks for all Pastel API endpoints
  - useColorInfo - Get color information
  - useConvertFormat - Format conversion
  - useLighten, useDarken, useSaturate, etc. - Manipulations
  - useGenerateRandom, useGenerateDistinct, useGenerateGradient
  - useNamedColors - Cached named colors list
  - Automatic error handling and loading states

**Playground Page (/playground):**
- Two-column layout: picker + info
- Live color preview with large swatch
- Real-time API integration with loading states
- Error handling with user-friendly messages
- Quick action buttons (ready for implementation)
- Responsive grid layout

**Features:**
- Toast notifications for clipboard copy
- Loading spinners during API calls
- Error display with helpful messages
- Accessible keyboard navigation
- Smooth transitions and animations

Build successful with playground page rendering! Ready for color manipulation actions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:05:23 +01:00
valknarness
6c1ec9b44f chore: upgrade to Next.js 16.0.1 with Turbopack
Update from Next.js 15.5.6 to Next.js 16.0.1:
- Now using Turbopack for production builds
- TypeScript config automatically updated (jsx: react-jsx)
- Build time improved with Turbopack
- All features working correctly

Build successful with Next.js 16 + Turbopack! 🚀

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 11:01:36 +01:00
valknarness
bd05f109b4 feat: initial Next.js 15 implementation with TypeScript and Tailwind CSS 4
Add complete project structure and foundation:

**Core Setup:**
- Next.js 15.5.6 with App Router and React 19
- TypeScript 5.7 with strict mode
- Tailwind CSS 4.1 with custom theme configuration
- ESLint and Prettier configuration

**Dependencies Installed:**
- @tanstack/react-query - Server state management
- zustand - Client state management
- framer-motion - Animations
- lucide-react - Icon library
- react-colorful - Color picker component
- cmdk - Command palette
- sonner - Toast notifications
- clsx + tailwind-merge - Class name utilities

**Project Structure:**
- app/ - Next.js App Router pages
- components/ - React components (ui, color, tools, layout, providers)
- lib/ - Utilities, API client, hooks, stores, constants
- tests/ - Unit and E2E test directories

**API Integration:**
- Type-safe Pastel API client with all 21 endpoints
- Complete TypeScript type definitions for requests/responses
- Error handling and response types

**UI Components:**
- Button component with variants (default, outline, ghost, destructive)
- Input component with focus states
- Providers wrapper (React Query, Toast)
- Root layout with Inter font and metadata

**Pages:**
- Home page with gradient hero and feature cards
- Links to playground and palette generation (pages pending)

**Configuration:**
- Tailwind with HSL color variables for theming
- Dark/light mode CSS variables
- Custom animations (fade-in, slide-up, slide-down)
- @tailwindcss/forms and @tailwindcss/typography plugins

Build successful: 102 kB First Load JS, static generation working.

Ready for color components and playground implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 10:55:42 +01:00
c544fbb6f2 docs: initial project setup and documentation
Add comprehensive documentation and planning for Pastel UI:
- Complete architecture design using Next.js 16 and Tailwind CSS 4
- Detailed development guide (CLAUDE.md) with all patterns and conventions
- Feature-rich README with keyboard shortcuts and export formats
- Project structure and technology stack decisions

Features planned:
- Color playground with multi-format support
- Palette generation (harmony, distinct, gradient)
- Accessibility tools (WCAG, color blindness simulation)
- Named colors explorer (148 CSS/X11 colors)
- Batch operations with CSV/JSON import/export
- Command palette (Cmd+K) and keyboard shortcuts
- Dark/light mode with system preference detection
- Shareable links with URL state

Tech stack:
- Next.js 16 with App Router and Server Components
- React 19 with latest concurrent features
- Tailwind CSS 4 with CSS-first configuration
- TypeScript strict mode
- React Query for server state
- Zustand for client state
- Framer Motion for animations

Ready for implementation phase.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 10:30:29 +01:00