Major architectural refactor introducing a pluggable visual effects system for improved modularity and extensibility.
Highlights
New VisualEffect Interface
Haze now uses a VisualEffect interface that separates the core effect infrastructure from specific effect implementations. This enables better separation of concerns, a smaller core module, and potential for custom visual effects in the future.
New haze-blur Module
All blur functionality has been extracted from the core haze module into a separate haze-blur module:
implementation("dev.chrisbanes.haze:haze:2.0.0-alpha01")
implementation("dev.chrisbanes.haze:haze-blur:2.0.0-alpha01")New blurEffect {} API
All blur-related properties now require a blurEffect {} wrapper:
Modifier.hazeEffect(state = hazeState) {
blurEffect {
blurRadius = 20.dp
colorEffects = listOf(HazeColorEffect.tint(...))
}
}Configurable HazePositionStrategy
New positionStrategy parameter on rememberHazeState() to control how effect positions are calculated, fixing split-window blur misalignment scenarios.
Breaking Changes
- New module dependency: Blur functionality now requires the
haze-blurmodule - API nesting: Blur properties (
blurRadius,colorEffects,style,noiseFactor,progressive,mask, etc.) now requireblurEffect {}wrapper - Package changes: Blur classes moved to
dev.chrisbanes.haze.blurpackage - Removed APIs:
rememberHazeState(blurEnabled)parameter removed (useblurEffect { blurEnabled = ... }) - Internal API renames:
create*ImageFilterfunctions renamed tocreate*RenderEffect - Dropped targets:
iosX64andmacosX64targets removed (Compose Multiplatform 1.11 deprecation)
Key Dependencies
- Kotlin 2.3.20
- Compose Multiplatform 1.11.0-alpha04
Migration
For detailed migration instructions, see the Migration Guide.
Full Changelog: 1.7.1...2.0.0-alpha01