You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v0.12.88: rewrite ThemeProvider, lazy colors in useTheme
ThemeProvider:
- Eliminate ~4s startup delay by removing eager color computation
- Just sets data-theme on <html> and provides context
- Add toggleTheme() for convenient light/dark switching
useTheme:
- Colors are now lazy via Proxy — only computed when accessed
- Components using only isDark/setTheme pay zero cost for color computation
- Add toggleTheme to return value
Docs:
- Update useTheme and ThemeProvider docs (en + 4 locales) with toggleTheme and lazy colors note
Copy file name to clipboardExpand all lines: packages/asterui/CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,18 @@ description: All notable changes to AsterUI
7
7
8
8
All notable changes to AsterUI are documented here.
9
9
10
+
## v0.12.88 (2026-03-21)
11
+
12
+
### Bug Fixes
13
+
14
+
-**ThemeProvider**: Rewrote to eliminate ~4 second startup delay. No longer computes theme colors eagerly — just sets `data-theme` on `<html>` and provides context.
15
+
-**useTheme**: Theme colors (`colors` property) are now lazy — only computed via canvas when accessed. Components that only need `isDark` or `setTheme` pay no cost for color computation.
16
+
17
+
### Features
18
+
19
+
-**ThemeProvider**: Added `toggleTheme()` to context for convenient light/dark switching.
20
+
-**useTheme**: Added `toggleTheme` to return value (available when using ThemeProvider).
0 commit comments