Commit Graph

26 Commits

Author SHA1 Message Date
d9d10cd6fb fix: preset saving and global pipeline selection
- Use pipelineStore.globalConfig instead of DEFAULT_PIPELINE_CONFIG for
  image processing, so global preset changes affect images
- Fix preset saving from modal to save actual edited config, not global
- Add local preset selection tracking in PipelinePanel for modal context
- Prevent modal config reset when store changes using untrack()
- Derive editingImage from store to always get latest data
- Fix ImagePreview to compare against lastProcessedConfig, not initial
- Preserve custom image overrides when global preset changes
- Clean up unused store functions (updateConfig, updateStep, isModified,
  getEffectiveConfig)
- Use clonePipelineConfig consistently instead of JSON.parse/stringify

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-14 08:08:44 -04:00
e37dd6f25d perf: reuse preview on apply instead of reprocessing
Pass the already-processed preview data URL when applying edits.
The thumbnail updates instantly without triggering another process cycle.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-14 07:10:00 -04:00
dbb896e2b7 perf: skip processing when properties are at neutral values
Add getEffectiveConfig function that only considers values affecting output.
Toggling a property on at its neutral value (e.g., gamma at 1.0) no longer
triggers a reprocess since the output would be identical.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-14 07:09:56 -04:00
a1b653efb7 perf: cache post-geometry pixels for faster adjustments
Split processing into geometry phase (crop/resize) and adjustment phase.
Cache the post-geometry pixels keyed by image fingerprint + crop/resize config.
When only adjustments change, skip expensive decode/crop/resize operations.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-14 07:09:51 -04:00
1518f34070 fix: improve manual crop resize and add ArrayBuffer caching
- Fix corner resize handles to use scale factor instead of direct delta
- Store initial region state on resize start to prevent compounding errors
- Add ArrayBuffer caching in worker pool to avoid re-reading files

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-14 07:09:47 -04:00
62a218f0cb feat: add manual crop mode
- CropOverlay component with draggable/resizable region
- Maintains target device aspect ratio
- Rule of thirds grid overlay
- Dark mask outside crop area
- Updates ImagePreview to show overlay in manual mode
- Updates photonWorker to handle manual crop regions
- Also fixes top/bottom crop modes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-14 06:14:47 -04:00
ef1ba9f97e chore: add Cloudflare Pages caching headers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-14 06:09:27 -04:00
1c5691b957 docs: add project README
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-13 18:59:56 -04:00
4a6a63b2b0 feat: add landing page and complete app
- EreaderMockup: animated SVG e-reader illustration
- DitherComparison: interactive before/after demo
- Landing page with hero, features, about sections
- Converter with view mode toggle and batch download
- Updated exports and theme styles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-13 18:52:58 -04:00
963c1eb709 feat: add pipeline editing components
- PipelinePanel: full pipeline configuration UI
- PipelineStep: reusable step toggle with controls
- EditImageModal: per-image pipeline editing with preview

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-13 18:52:40 -04:00
e9406bb25f feat: add image display components
- ImageCard: image preview with comparison slider
- ImageGrid: responsive grid layout for cards
- ImagePreview: live preview with pipeline processing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-13 18:52:35 -04:00
a777ab364d feat: add core UI components
- DropZone: drag & drop file upload with visual feedback
- DeviceSelector: device dropdown grouped by brand
- CustomDeviceModal: form for custom device creation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-13 18:52:30 -04:00
0b1cfc5666 feat: add images store
- Image queue with concurrent processing
- File validation (format, size)
- Processing status tracking
- Pipeline override per image
- Batch reprocessing

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:12:56 -04:00
d02c8d281a feat: add pipeline store
- Global pipeline configuration
- Built-in and user presets
- localStorage persistence
- Preset CRUD operations

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:12:21 -04:00
7bd0c4c793 feat: add device store
- Selected device state
- Custom device management
- Device selection by ID

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:11:56 -04:00
a1d1f070cf chore: export processing functions
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:11:23 -04:00
0d6ec68294 feat: add pipeline API and download utilities
- processImageWithPipeline for full pipeline processing
- ZIP archive creation with JSZip
- File download helpers
- Output filename generation

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:11:09 -04:00
ee71b91868 feat: add worker pool for parallel processing
- Dynamic pool sizing based on CPU cores
- Job queue with automatic worker assignment
- Strips Svelte proxies before sending to workers
- Graceful error handling and cleanup

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:10:39 -04:00
c06a51cad9 feat: add web worker for image processing
- Full pipeline processing off main thread
- Image decoding via createImageBitmap + OffscreenCanvas
- All adjustments and dithering algorithms
- Blob output with data URL conversion

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:10:16 -04:00
a4c3185a21 feat: add photon WASM utilities
- Image loading and canvas conversion
- Crop to aspect ratio
- Resize with Lanczos3 sampling
- Greyscale conversion
- Brightness, contrast, gamma adjustments
- Dithering algorithms (Floyd-Steinberg, ordered, Atkinson)
- Quantization and auto-levels

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:09:20 -04:00
d5ba4a4f3e chore: update lib exports
Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:07:51 -04:00
10526d3dbf feat: add tailwind theme and base styles
- E-ink inspired color palette (ink, paper, grey scale)
- Accent colors for interactive elements
- Custom shadows and border radius tokens
- Smooth scroll and floating animation

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:07:37 -04:00
c985cf4193 feat: add e-reader device presets
- Kindle: Paperwhite 5, Paperwhite 4, Oasis 3, Scribe, Basic
- Kobo: Clara 2E, Libra 2, Sage
- reMarkable 2, Boox Note Air
- Helper to group devices by brand

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:07:24 -04:00
496be2701f feat: add core type definitions
- Device, ImageEntry, Dimensions types
- PipelineConfig with all processing steps
- Built-in pipeline presets (default, high-contrast, etc.)
- Validation constraints and utility functions

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:06:39 -04:00
0cb43607ac chore: configure vite for WASM and add dependencies
- Add vite-plugin-wasm for Photon WASM support
- Configure worker format and build target
- Add photon, jszip, lucide-svelte
- Add tailwindcss forms/typography plugins

Co-Authored-By: Claude <noreply@anthropic.com>
2026-05-13 18:06:06 -04:00
6f8a187246 Create project skeleton with sv 2026-05-13 17:40:55 -04:00