Files
Sebastian Krüger 5a20e12ea4 feat(phase-13): implement auto-save system with localStorage
Add comprehensive auto-save functionality to prevent data loss.

Features:
- Auto-save every 30 seconds
- Saves all layers with canvas data
- Preserves layer masks
- Saves layer properties (visibility, opacity, blend mode, etc.)
- Toast notification on restore
- Utility functions for managing auto-save:
  * hasAutoSave() - Check if auto-save exists
  * loadAutoSave() - Restore from auto-save
  * clearAutoSave() - Clear saved data
  * getAutoSaveTime() - Get save timestamp
- Converts canvas to data URLs for storage
- Restores canvas from data URLs
- Handles errors gracefully

Changes:
- Created hooks/use-auto-save.ts
- useAutoSave() hook for periodic saving
- Saves project structure to localStorage
- Auto-save key: 'paint-ui-autosave'
- 30-second save interval
- Includes timestamp for restore info

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 20:15:49 +01:00
..