fix(CssManager): Make CssManager a singleton and export the shared instance via getSingleton; update tests and dependencies
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user