fix(CssManager): Make CssManager a singleton and export the shared instance via getSingleton; update tests and dependencies

This commit is contained in:
2025-11-16 14:53:02 +00:00
parent 217ea3e9d4
commit 8d60911b34
8 changed files with 2734 additions and 1167 deletions

View File

@@ -1 +1,15 @@
# Project Hints
## CssManager Singleton Pattern
**Location:** `ts/classes.cssmanager.ts`
The `CssManager` class uses a singleton pattern:
- **Static method:** `CssManager.getSingleton()` - Returns the singleton instance
- **Exported instance:** `cssManager` (from `ts/index.ts`) - Uses `getSingleton()` internally
Both access patterns are supported for backward compatibility:
- `cssManager.method()` - Legacy pattern (still works)
- `CssManager.getSingleton().method()` - Preferred pattern
The singleton ensures only one instance manages CSS variables and theme changes throughout the application.