Commit graph

2 commits

Author SHA1 Message Date
0334d3a831 feat(admin): create Svelte 5 runes-based autosave store
Introduces createAutoSaveStore() using $state() for automatic reactivity.
New store provides cleaner API while maintaining backward compatibility.

Changes:
- New: src/lib/admin/autoSave.svelte.ts with createAutoSaveStore()
- Uses $state() for status and lastError (reactive getters)
- Export AutoSaveStore and AutoSaveStoreOptions types
- Add JSDoc with usage examples
- Update autoSaveLifecycle.ts to accept both old and new types
- Export AutoSaveController type from old file for compatibility

Old createAutoSaveController() remains unchanged for gradual migration.
Type checking passes with no new errors.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-07 07:58:20 -07:00
6b21c4f7b3 test: cover autosave controller and lifecycle helper 2025-10-07 03:18:10 -07:00